Update LSP config and DAP support
This commit is contained in:
parent
94ce66c22c
commit
00ec5eca12
1
init.vim
1
init.vim
|
@ -188,7 +188,6 @@ let g:localvimrc_whitelist='/home/crater2150/work/.*'
|
|||
let g:localvimrc_sandbox=0
|
||||
|
||||
lua require("my-lsp")
|
||||
lua require("lsputils")
|
||||
lua require("conf.cmp")
|
||||
lua require("conf.trouble")
|
||||
lua require("conf.treesitter")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local cmp = require'cmp'
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
telescope = require('telescope')
|
||||
telescope.load_extension('fzf_native')
|
||||
telescope.load_extension('lsp_handlers')
|
||||
--telescope.load_extension('lsp_handlers')
|
||||
|
|
45
lua/debug.lua
Normal file
45
lua/debug.lua
Normal file
|
@ -0,0 +1,45 @@
|
|||
-- Setup nvim-cmp.
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
-- For `vsnip` user.
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
|
||||
-- For `luasnip` user.
|
||||
-- require('luasnip').lsp_expand(args.body)
|
||||
|
||||
-- For `ultisnips` user.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
|
||||
-- For vsnip user.
|
||||
{ name = 'vsnip' },
|
||||
|
||||
-- For luasnip user.
|
||||
-- { name = 'luasnip' },
|
||||
|
||||
-- For ultisnips user.
|
||||
-- { name = 'ultisnips' },
|
||||
|
||||
{ name = 'buffer' },
|
||||
}
|
||||
})
|
||||
|
||||
-- Setup lsp.
|
||||
metals_config = require("metals").bare_config
|
||||
metals_config.init_options.statusBarProvider = "on"
|
||||
metals_config.settings = { showImplicitArguments = true }
|
||||
metals_config.on_attach = on_attach
|
||||
metals_config.capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
@ -2,45 +2,52 @@ local status, metals = pcall(require, "metals")
|
|||
if (not status) then return function() end end
|
||||
|
||||
return function(on_attach)
|
||||
metals_config = metals.bare_config()
|
||||
metals_config.init_options.statusBarProvider = "on"
|
||||
metals_config.settings = {
|
||||
showImplicitArguments = true,
|
||||
superMethodLensesEnabled = true,
|
||||
}
|
||||
metals_config.on_attach = function(client, bufnr)
|
||||
require("metals").setup_dap()
|
||||
on_attach(client, bufnr)
|
||||
end
|
||||
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
-- Debug settings if you're using nvim-dap
|
||||
local dap = require("dap")
|
||||
dap.configurations.scala = {
|
||||
{
|
||||
type = "scala",
|
||||
request = "launch",
|
||||
name = "RunOrTest",
|
||||
metals = {
|
||||
runType = "runOrTestFile",
|
||||
--args = { "firstArg", "secondArg", "thirdArg" }, -- here just as an example
|
||||
},
|
||||
metals_config = metals.bare_config()
|
||||
metals_config.init_options.statusBarProvider = "on"
|
||||
metals_config.settings = {
|
||||
showImplicitArguments = true,
|
||||
superMethodLensesEnabled = true,
|
||||
}
|
||||
metals_config.on_attach = function(client, bufnr)
|
||||
require("metals").setup_dap()
|
||||
on_attach(client, bufnr)
|
||||
end
|
||||
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
-- Debug settings if you're using nvim-dap
|
||||
local dap = require("dap")
|
||||
dap.configurations.scala = {
|
||||
{
|
||||
type = "scala",
|
||||
request = "launch",
|
||||
name = "RunOrTest",
|
||||
metals = {
|
||||
runType = "runOrTestFile",
|
||||
--args = { "firstArg", "secondArg", "thirdArg" }, -- here just as an example
|
||||
},
|
||||
{
|
||||
type = "scala",
|
||||
request = "launch",
|
||||
name = "Test Target",
|
||||
metals = {
|
||||
runType = "testTarget",
|
||||
},
|
||||
},
|
||||
{
|
||||
type = "scala",
|
||||
request = "launch",
|
||||
name = "Test Target",
|
||||
metals = {
|
||||
runType = "testTarget",
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
vim.cmd [[augroup lsp]]
|
||||
vim.cmd [[au!]]
|
||||
vim.cmd([[autocmd FileType scala setlocal omnifunc=v:lua.vim.lsp.omnifunc]])
|
||||
vim.cmd [[au FileType scala,sbt lua require("metals").initialize_or_attach(metals_config)]]
|
||||
vim.cmd [[augroup end]]
|
||||
-- Autocmd that will actually be in charging of starting the whole thing
|
||||
local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
-- NOTE: You may or may not want java included here. You will need it if you
|
||||
-- want basic Java support but it may also conflict if you are using
|
||||
-- something like nvim-jdtls which also works on a java filetype autocmd.
|
||||
pattern = { "scala", "sbt", "java" },
|
||||
callback = function()
|
||||
require("metals").initialize_or_attach(metals_config)
|
||||
end,
|
||||
group = nvim_metals_group,
|
||||
})
|
||||
|
||||
return metals_config
|
||||
return metals_config
|
||||
end
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
if vim.fn.has('nvim-0.5.1') == 1 then
|
||||
vim.lsp.handlers['textDocument/codeAction'] = require'lsputil.codeAction'.code_action_handler
|
||||
vim.lsp.handlers['textDocument/references'] = require'lsputil.locations'.references_handler
|
||||
vim.lsp.handlers['textDocument/definition'] = require'lsputil.locations'.definition_handler
|
||||
vim.lsp.handlers['textDocument/declaration'] = require'lsputil.locations'.declaration_handler
|
||||
vim.lsp.handlers['textDocument/typeDefinition'] = require'lsputil.locations'.typeDefinition_handler
|
||||
vim.lsp.handlers['textDocument/implementation'] = require'lsputil.locations'.implementation_handler
|
||||
vim.lsp.handlers['textDocument/documentSymbol'] = require'lsputil.symbols'.document_handler
|
||||
vim.lsp.handlers['workspace/symbol'] = require'lsputil.symbols'.workspace_handler
|
||||
else
|
||||
local bufnr = vim.api.nvim_buf_get_number(0)
|
||||
|
||||
vim.lsp.handlers['textDocument/codeAction'] = function(_, _, actions)
|
||||
require('lsputil.codeAction').code_action_handler(nil, actions, nil, nil, nil)
|
||||
end
|
||||
|
||||
vim.lsp.handlers['textDocument/references'] = function(_, _, result)
|
||||
require('lsputil.locations').references_handler(nil, result, { bufnr = bufnr }, nil)
|
||||
end
|
||||
|
||||
vim.lsp.handlers['textDocument/definition'] = function(_, method, result)
|
||||
require('lsputil.locations').definition_handler(nil, result, { bufnr = bufnr, method = method }, nil)
|
||||
end
|
||||
|
||||
vim.lsp.handlers['textDocument/declaration'] = function(_, method, result)
|
||||
require('lsputil.locations').declaration_handler(nil, result, { bufnr = bufnr, method = method }, nil)
|
||||
end
|
||||
|
||||
vim.lsp.handlers['textDocument/typeDefinition'] = function(_, method, result)
|
||||
require('lsputil.locations').typeDefinition_handler(nil, result, { bufnr = bufnr, method = method }, nil)
|
||||
end
|
||||
|
||||
vim.lsp.handlers['textDocument/implementation'] = function(_, method, result)
|
||||
require('lsputil.locations').implementation_handler(nil, result, { bufnr = bufnr, method = method }, nil)
|
||||
end
|
||||
|
||||
vim.lsp.handlers['textDocument/documentSymbol'] = function(_, _, result, _, bufn)
|
||||
require('lsputil.symbols').document_handler(nil, result, { bufnr = bufn }, nil)
|
||||
end
|
||||
|
||||
vim.lsp.handlers['textDocument/symbol'] = function(_, _, result, _, bufn)
|
||||
require('lsputil.symbols').workspace_handler(nil, result, { bufnr = bufn }, nil)
|
||||
end
|
||||
end
|
|
@ -1,60 +1,52 @@
|
|||
local lsp_status = require('lsp-status')
|
||||
--local lsp_status = require('lsp-status')
|
||||
|
||||
lsp_status.register_progress()
|
||||
|
||||
-- enable snippet support
|
||||
--local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
--capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
--capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||
-- properties = {
|
||||
-- 'documentation',
|
||||
-- 'detail',
|
||||
-- 'additionalTextEdits',
|
||||
-- }
|
||||
--}
|
||||
--capabilities = vim.tbl_extend('keep', capabilities or {}, lsp_status.capabilities)
|
||||
--lsp_status.register_progress()
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
local function buf_set_keymap(...) vim.keymap.set(...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
local map = vim.keymap.set
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
--Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
--Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
|
||||
-- Mappings.
|
||||
local opts = { noremap=true, silent=true, buffer=bufnr }
|
||||
local loud = { noremap=true, buffer=bufnr }
|
||||
-- Mappings.
|
||||
local opts = { silent=true, buffer=bufnr }
|
||||
local loud = { buffer=bufnr }
|
||||
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
buf_set_keymap('v', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
buf_set_keymap('n', '<Leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
buf_set_keymap('n', '<Leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
buf_set_keymap('n', '<M-a>', '<cmd>lua vim.lsp.buf.code_action()<CR>', loud)
|
||||
buf_set_keymap('n', '<M-l>', '<cmd>lua vim.codelens.run()<CR>', loud)
|
||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
buf_set_keymap('n', '<M-e>', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
buf_set_keymap('n', '<M-q>', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap("n", "<Leader>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
buf_set_keymap("n", "<leader>dc", function() require("dap").continue() end, opts)
|
||||
buf_set_keymap("n", "<leader>dr", function() require("dap").repl.toggle() end, opts)
|
||||
buf_set_keymap("n", "<leader>dK", function() require("dap.ui.widgets").hover() end, opts)
|
||||
buf_set_keymap("n", "<leader>dt", function() require("dap").toggle_breakpoint() end, opts)
|
||||
buf_set_keymap("n", "<leader>dso", function() require("dap").step_over() end, opts)
|
||||
buf_set_keymap("n", "<leader>dsi", function() require("dap").step_into() end, opts)
|
||||
buf_set_keymap("n", "<leader>dl", function() require("dap").run_last() end, opts)
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
map('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
map('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
map('n', 'K', vim.lsp.buf.hover, opts)
|
||||
map('v', 'K', vim.lsp.buf.hover, opts)
|
||||
map('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||
map('n', '<C-k>', vim.lsp.buf.signature_help, opts)
|
||||
map('n', '<Leader>D', vim.lsp.buf.type_definition, opts)
|
||||
map('n', '<Leader>rn', vim.lsp.buf.rename, opts)
|
||||
map('n', '<M-a>', vim.lsp.buf.code_action, loud)
|
||||
map('n', '<M-s>', vim.lsp.codelens.run, loud)
|
||||
map('n', 'gr', vim.lsp.buf.references, opts)
|
||||
map('n', '<M-e>', vim.diagnostic.open_float, opts)
|
||||
map('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
map('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
map('n', '<M-q>', vim.diagnostic.setloclist, opts)
|
||||
map("n", "<Leader>f", vim.lsp.buf.formatting, opts)
|
||||
map("n", "<leader>dc", function() require("dap").continue() end, opts)
|
||||
map("n", "<leader>dr", function() require("dap").repl.toggle() end, opts)
|
||||
map("n", "<leader>dK", function() require("dap.ui.widgets").hover() end, opts)
|
||||
map("n", "<leader>dt", function() require("dap").toggle_breakpoint() end, opts)
|
||||
map("n", "<leader>dso", function() require("dap").step_over() end, opts)
|
||||
map("n", "<leader>dsi", function() require("dap").step_into() end, opts)
|
||||
map("n", "<leader>dl", function() require("dap").run_last() end, opts)
|
||||
|
||||
lsp_status.on_attach(client)
|
||||
map("n", "<leader>aa", vim.diagnostic.setqflist, opts)
|
||||
map("n", "<leader>aw", function() vim.diagnostic.setqflist({ severity = "W" }) end, opts)
|
||||
map("n", "<leader>ae", function() vim.diagnostic.setqflist({ severity = "E" }) end, opts)
|
||||
|
||||
--require'completion'.on_attach(client, bufnr)
|
||||
vim.cmd [[autocmd BufEnter,CursorHold,InsertLeave <buffer> lua vim.lsp.codelens.refresh()]]
|
||||
vim.cmd [[autocmd CursorHoldI * silent! lua vim.lsp.buf.signature_help()]]
|
||||
vim.cmd [[autocmd CursorHold * lua vim.diagnostic.open_float({max_width = 100, focusable = false})]]
|
||||
end
|
||||
|
||||
require("lsp.metals")(on_attach)
|
||||
|
@ -75,5 +67,3 @@ vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
|||
}
|
||||
)
|
||||
|
||||
vim.cmd [[autocmd CursorHoldI * silent! lua vim.lsp.buf.signature_help()]]
|
||||
vim.cmd [[autocmd CursorHold * lua vim.diagnostic.open_float({max_width = 100, focusable = false})]]
|
||||
|
|
137
lua/my-lsp.lua.orig
Normal file
137
lua/my-lsp.lua.orig
Normal file
|
@ -0,0 +1,137 @@
|
|||
<<<<<<< Updated upstream
|
||||
local lspconfig = require('lspconfig')
|
||||
local configs = require('lspconfig.configs')
|
||||
=======
|
||||
local lsp_status = require('lsp-status')
|
||||
|
||||
lsp_status.register_progress()
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
-- enable snippet support
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||
properties = {
|
||||
'documentation',
|
||||
'detail',
|
||||
'additionalTextEdits',
|
||||
}
|
||||
}
|
||||
capabilities = vim.tbl_extend('keep', capabilities or {}, lsp_status.capabilities)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
--Enable completion triggered by <c-x><c-o>
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
local opts = { noremap=true, silent=true }
|
||||
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
buf_set_keymap('v', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
buf_set_keymap('n', '<Leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
buf_set_keymap('n', '<Leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
buf_set_keymap('n', '<M-a>', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
buf_set_keymap('n', '<M-e>', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
buf_set_keymap('n', '<M-q>', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap("n", "<Leader>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
|
||||
lsp_status.on_attach(client)
|
||||
|
||||
--require'completion'.on_attach(client, bufnr)
|
||||
end
|
||||
|
||||
local lsp_installer = require("nvim-lsp-installer")
|
||||
lsp_installer.on_server_ready(function(server)
|
||||
local opts = {}
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
-- (optional) Customize the options passed to the server
|
||||
-- if server.name == "tsserver" then
|
||||
-- opts.root_dir = function() ... end
|
||||
-- end
|
||||
=======
|
||||
require'lspinstall'.setup() -- important
|
||||
|
||||
local servers = require'lspinstall'.installed_servers()
|
||||
for _, server in pairs(servers) do
|
||||
require'lspconfig'[server].setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
-- This setup() function is exactly the same as lspconfig's setup function.
|
||||
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
server:setup(opts)
|
||||
end)
|
||||
|
||||
metals_config = require("metals").bare_config()
|
||||
metals_config.init_options.statusBarProvider = "on"
|
||||
metals_config.settings = { showImplicitArguments = true }
|
||||
metals_config.on_attach = on_attach
|
||||
metals_config.capabilities = capabilities
|
||||
|
||||
vim.cmd [[augroup lsp]]
|
||||
vim.cmd [[au!]]
|
||||
vim.cmd [[au FileType scala,sbt lua require("metals").initialize_or_attach(metals_config)]]
|
||||
vim.cmd [[augroup end]]
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
<<<<<<< Updated upstream
|
||||
local servers = { "lemminx" }
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
}
|
||||
end
|
||||
=======
|
||||
--local nvim_lsp = require('lspconfig')
|
||||
--local servers = { "lemminx" }
|
||||
--for _, lsp in ipairs(servers) do
|
||||
-- nvim_lsp[lsp].setup {
|
||||
-- on_attach = on_attach,
|
||||
-- capabilities = capabilities,
|
||||
-- flags = {
|
||||
-- debounce_text_changes = 150,
|
||||
-- }
|
||||
-- }
|
||||
--end
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
virtual_text = false,
|
||||
underline = true,
|
||||
signs = true,
|
||||
}
|
||||
)
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
silent = true, focusable = false
|
||||
}
|
||||
)
|
||||
|
||||
-- vim.cmd [[autocmd CursorMoved * lua vim.lsp.diagnostic.show_line_diagnostics()]]
|
||||
-- vim.cmd [[autocmd CursorMoved * lua vim.lsp.diagnostic.show_line_diagnostics()]]
|
||||
vim.cmd [[autocmd CursorHoldI * silent! lua vim.lsp.buf.signature_help()]]
|
||||
vim.cmd [[autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics({max_width = 100, focusable = false})]]
|
|
@ -31,6 +31,7 @@ Plug 'neovim/nvim-lspconfig'
|
|||
Plug 'hrsh7th/cmp-buffer'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'hrsh7th/cmp-path'
|
||||
Plug 'hrsh7th/cmp-cmdline'
|
||||
Plug 'hrsh7th/cmp-vsnip'
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/vim-vsnip'
|
||||
|
@ -41,8 +42,6 @@ Plug 'williamboman/nvim-lsp-installer'
|
|||
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
Plug 'nvim-lua/lsp-status.nvim'
|
||||
Plug 'RishabhRD/popfix'
|
||||
Plug 'RishabhRD/nvim-lsputils'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'folke/trouble.nvim'
|
||||
Plug 'folke/lsp-colors.nvim'
|
||||
|
|
Loading…
Reference in a new issue