diff options
-rw-r--r-- | lua/plugins/lsp.lua | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index bb2ae60..82244d1 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -68,10 +68,29 @@ vim.api.nvim_create_autocmd('LspAttach', { local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } -for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) -end +vim.diagnostic.config({ + signs = { + enable = true, + text = { + ["ERROR"] = signs.Error, + ["WARN"] = signs.Warn, + ["HINT"] = signs.Hint, + ["INFO"] = signs.Info, + }, + texthl = { + ["ERROR"] = "DiagnosticDefault", + ["WARN"] = "DiagnosticDefault", + ["HINT"] = "DiagnosticDefault", + ["INFO"] = "DiagnosticDefault", + }, + numhl = { + ["ERROR"] = "DiagnosticDefault", + ["WARN"] = "DiagnosticDefault", + ["HINT"] = "DiagnosticDefault", + ["INFO"] = "DiagnosticDefault", + }, + } +}) vim.o.updatetime = 250 -- vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false, scope="cursor"})]] |