diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-10-02 22:10:46 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-10-02 22:10:46 +0200 |
commit | e3241e3caddeacd4f9307d666c6edddf27a6d1de (patch) | |
tree | bb277882a45c546806234fe4204ced5ff400f03c /fnl/plugins/lsp | |
parent | 72a18a764a1ba585c218f76bd8d42c19e7802b5f (diff) |
Fix diagnostics
Diffstat (limited to 'fnl/plugins/lsp')
-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)) |