summaryrefslogtreecommitdiff
path: root/fnl/plugins/lsp/diagnostics.fnl
blob: 3c24b5c3e477f11efb9e5ceb13e299ffa65ce057 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
;; Handlers for the requests and responses from and to the lsp server.

(local icons (require :settings.icons))

(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 {:text signs}
               :update_in_insert false
               :underline true
               :severity_sort true
               :float {:focusable false
                       :style :minimal
                       :border :single
                       :source :always
                       :header ""
                       :prefix ""}})

(λ setup []
  (vim.diagnostic.config config)
  (set vim.lsp.handlers.textDocument/hover false)
  (set vim.lsp.handlers.textDocument/signatureHelp false))

{: setup}