From e3241e3caddeacd4f9307d666c6edddf27a6d1de Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 2 Oct 2024 22:10:46 +0200 Subject: Fix diagnostics --- fnl/plugins/lsp/diagnostics.fnl | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'fnl') 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)) -- cgit v1.2.3-70-g09d2