diff options
-rw-r--r-- | fnl/plugins/lsp/diagnostics.fnl | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fnl/plugins/lsp/diagnostics.fnl b/fnl/plugins/lsp/diagnostics.fnl index 5956e0e..dc64517 100644 --- a/fnl/plugins/lsp/diagnostics.fnl +++ b/fnl/plugins/lsp/diagnostics.fnl @@ -2,17 +2,13 @@ (local icons (require :settings.icons)) -(local signs [{:name :DiagnosticSignError :text (. icons :error)} - {:name :DiagnosticSignWarn :text (. icons :warn)} - {:name :DiagnosticSignHint :text (. icons :hint)} - {:name :DiagnosticSignInfo :text (. icons :info)}]) - -(λ configure-signs [] - (each [_ sign (ipairs signs)] - (vim.fn.sign_define sign.name {:texthl sign.name :text sign.text :numhl ""}))) +(local signs {vim.diagnostic.severity.ERROR (. icons :error) + vim.diagnostic.severity.WARN (. icons :warn) + vim.diagnostic.severity.INFO (. icons :info) + vim.diagnostic.severity.HINT (. icons :hint)}) (local config {:virtual_text false - :signs {:active signs} + :signs {:text signs} :update_in_insert false :underline true :severity_sort true @@ -24,7 +20,6 @@ :prefix ""}}) (λ setup [] - (configure-signs) (vim.diagnostic.config config) (set vim.lsp.handlers.textDocument/hover false) (set vim.lsp.handlers.textDocument/signatureHelp false)) |