diff options
Diffstat (limited to 'lua/config/diagnostic.lua')
| -rw-r--r-- | lua/config/diagnostic.lua | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/lua/config/diagnostic.lua b/lua/config/diagnostic.lua index 84d57b5..011d83a 100644 --- a/lua/config/diagnostic.lua +++ b/lua/config/diagnostic.lua @@ -1,28 +1,50 @@ - vim.diagnostic.config { virtual_text = false, signs = { text = { [vim.diagnostic.severity.ERROR] = '', [vim.diagnostic.severity.WARN] = '', - [vim.diagnostic.severity.INFO] = '', - [vim.diagnostic.severity.HINT] = '', - }, - linehl = { - [vim.diagnostic.severity.ERROR] = 'ErrorMsg', - }, - numhl = { - [vim.diagnostic.severity.WARN] = 'WarningMsg', + [vim.diagnostic.severity.INFO] = '', + [vim.diagnostic.severity.HINT] = '' }, + -- linehl = { + -- [vim.diagnostic.severity.ERROR] = 'ErrorMsg', + -- }, + -- numhl = { + -- [vim.diagnostic.severity.WARN] = 'WarningMsg', + -- }, + }, + update_in_insert = true, + underline = true, + severity_sort = true, + float = { + -- focusable = true, + -- style = "minimal", + border = "rounded", + source = "if_many", + -- header = "", + -- prefix = "", }, } --- vim.diagnostic.config { --- virtual_text = false, --- } --- --- 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 = "" }) --- end +-- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { +-- border = "rounded", +-- -- width = 100, +-- -- height = 10, +-- position = "center", +-- header = "", +-- prefix = "", +-- source = "always", +-- style = "minimal", +-- focusable = true, +-- }) + +-- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { +-- border = "rounded", +-- }) + +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { + -- delay update diagnostics + update_in_insert = false, +}) + |