make lspconfig mappings compatible with nvim 0.6v
This commit is contained in:
parent
31e551af30
commit
3a966955d4
3 changed files with 9 additions and 10 deletions
|
@ -203,12 +203,11 @@ M.mappings.plugins = {
|
|||
rename = "<leader>rn",
|
||||
code_action = "<leader>ca",
|
||||
references = "gr",
|
||||
show_line_diagnostics = "ge",
|
||||
float_diagnostics = "ge",
|
||||
goto_prev = "[d",
|
||||
goto_next = "]d",
|
||||
set_loclist = "<leader>q",
|
||||
formatting = "<leader>fm",
|
||||
range_code_action = "<leader>ca",
|
||||
},
|
||||
|
||||
nvimtree = {
|
||||
|
|
|
@ -154,12 +154,11 @@ M.lspconfig = function()
|
|||
map("n", m.rename, "<cmd>lua vim.lsp.buf.rename()<CR>")
|
||||
map("n", m.code_action, "<cmd>lua vim.lsp.buf.code_action()<CR>")
|
||||
map("n", m.references, "<cmd>lua vim.lsp.buf.references()<CR>")
|
||||
map("n", m.show_line_diagnostics, "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>")
|
||||
map("n", m.goto_prev, "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>")
|
||||
map("n", m.goto_next, "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>")
|
||||
map("n", m.set_loclist, "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>")
|
||||
map("n", m.float_diagnostics, "<cmd>lua vim.diagnostic.open_float()<CR>")
|
||||
map("n", m.goto_prev, "<cmd>lua vim.diagnostic.goto_prev()<CR>")
|
||||
map("n", m.goto_next, "<cmd>lua vim.diagnostic.goto_next()<CR>")
|
||||
map("n", m.set_loclist, "<cmd>lua vim.diagnostic.set_loclist()<CR>")
|
||||
map("n", m.formatting, "<cmd>lua vim.lsp.buf.formatting()<CR>")
|
||||
map("v", m.range_code_action, "<cmd>lua vim.lsp.buf.range_code_action()<CR>")
|
||||
end
|
||||
|
||||
M.nvimtree = function()
|
||||
|
|
|
@ -115,15 +115,16 @@ M.lsp_handlers = function()
|
|||
lspSymbol("Hint", "")
|
||||
lspSymbol("Warn", "")
|
||||
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
vim.diagnostic.config {
|
||||
virtual_text = {
|
||||
prefix = "",
|
||||
spacing = 0,
|
||||
},
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = false, -- update diagnostics insert mode
|
||||
})
|
||||
update_in_insert = false,
|
||||
}
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = "single",
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue