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