Add typescript-language-server and configure telescope.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
-- enables LSPs and configures useful bindings
|
||||
|
||||
vim.lsp.enable('lua_ls')
|
||||
vim.lsp.enable 'lua_ls'
|
||||
vim.lsp.enable 'ts_ls'
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
callback = function(ev)
|
||||
@@ -12,11 +13,11 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
vim.lsp.completion.get()
|
||||
end)
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Diagnostics
|
||||
vim.diagnostic.config({
|
||||
vim.diagnostic.config {
|
||||
-- Use the default configuration
|
||||
-- virtual_lines = true
|
||||
|
||||
@@ -25,4 +26,4 @@ vim.diagnostic.config({
|
||||
-- Only show virtual line diagnostics for the current cursor line
|
||||
current_line = true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,45 @@ return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.8',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' } },
|
||||
config = function() end,
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'make',
|
||||
config = function()
|
||||
require('telescope').load_extension 'fzf'
|
||||
end,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>t',
|
||||
function()
|
||||
require('telescope.builtin').find_files()
|
||||
end,
|
||||
desc = 'Find file',
|
||||
},
|
||||
{
|
||||
'<leader>f',
|
||||
function()
|
||||
require('telescope.builtin').live_grep()
|
||||
end,
|
||||
desc = 'Codesearch',
|
||||
},
|
||||
{
|
||||
'<leader>g',
|
||||
function()
|
||||
require('telescope.builtin').lsp_references()
|
||||
end,
|
||||
desc = 'View references',
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
pickers = {
|
||||
lsp_references = {
|
||||
theme = 'ivy',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user