fix(vim): update lsp config to fix deprecations
Nvim lsp has changed the way the config works. This is now on all the versions on nvim I am using. The main one is in tumbleweed this is relatively up to date. The sign_define has also moved into the diagnostic config.
This commit is contained in:
parent
26ae32de82
commit
ac2b15e673
1 changed files with 9 additions and 16 deletions
|
|
@ -113,29 +113,22 @@ end
|
|||
|
||||
require("ionide").setup { on_attach = on_attach, capabilities = capabilities }
|
||||
|
||||
-- Change the diagnostic signs
|
||||
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint", numhl = "DiagnosticSignHint" })
|
||||
vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSignInfo", numhl = "DiagnosticSignInfo" })
|
||||
vim.fn.sign_define("DiagnosticSignWarn", { text = "", texthl = "DiagnosticSignWarn", numhl = "DiagnosticSignWarn" })
|
||||
vim.fn.sign_define(
|
||||
"DiagnosticSignError",
|
||||
{ text = "", texthl = "DiagnosticSignError", numhl = "DiagnosticSignError" }
|
||||
)
|
||||
|
||||
local border = "rounded"
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||
vim.lsp.handlers["textDocument/show_line_diagnostics"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||
vim.lsp.handlers["textDocument/diagnostic"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||
vim.lsp.handlers["textDocument/diagnostics"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||
vim.diagnostic.config {
|
||||
float = {
|
||||
focusable = false,
|
||||
border = border,
|
||||
border = "rounded",
|
||||
},
|
||||
virtual_text = {
|
||||
prefix = " ",
|
||||
},
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = '',
|
||||
[vim.diagnostic.severity.INFO] = '',
|
||||
[vim.diagnostic.severity.WARN] = '',
|
||||
[vim.diagnostic.severity.HINT] = '',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vim.cmd [[set updatetime=1000]]
|
||||
|
|
|
|||
Loading…
Reference in a new issue