nvim: Update diagnostics
This commit is contained in:
parent
8a7278f701
commit
71fc3529f7
1 changed files with 9 additions and 5 deletions
|
@ -8,15 +8,19 @@
|
||||||
:virtual_text {:source false}
|
:virtual_text {:source false}
|
||||||
:signs false
|
:signs false
|
||||||
:update_in_insert false})
|
:update_in_insert false})
|
||||||
(cmd "sign define DiagnosticSignError text= texthl=DiagnosticSignError linehl= numhl=")
|
(cmd "sign define DiagnosticSignError text= texthl=DiagnosticSignError linehl= numhl=DiagnosticSignError")
|
||||||
(cmd "sign define DiagnosticSignWarn text= texthl=DiagnosticSignWarn linehl= numhl=")
|
(cmd "sign define DiagnosticSignWarn text= texthl=DiagnosticSignWarn linehl= numhl=DiagnosticSignWarn")
|
||||||
(cmd "sign define DiagnosticSignInfo text= texthl=DiagnosticSignInfo linehl= numhl=")
|
(cmd "sign define DiagnosticSignInfo text= texthl=DiagnosticSignInfo linehl= numhl=DiagnosticSignInfo")
|
||||||
(cmd "sign define DiagnosticSignHint text= texthl=DiagnosticSignHint linehl= numhl="))
|
(cmd "sign define DiagnosticSignHint text= texthl=DiagnosticSignHint linehl= numhl=DiagnosticSignHint"))
|
||||||
|
|
||||||
(fn mod.maybe-enable-lsp [client bufnr]
|
(fn mod.maybe-enable-lsp [client bufnr]
|
||||||
(when (= vim.b.nifoc_lsp_enabled nil)
|
(when (= vim.b.nifoc_lsp_enabled nil)
|
||||||
(api.nvim_buf_set_var bufnr :nifoc_lsp_enabled 1)
|
(api.nvim_buf_set_var bufnr :nifoc_lsp_enabled 1)
|
||||||
(keymap.lsp-attach client bufnr)))
|
(keymap.lsp-attach client bufnr)
|
||||||
|
(vim.api.nvim_create_autocmd [:CursorHold :CursorHoldI]
|
||||||
|
{:callback #(vim.diagnostic.open_float nil
|
||||||
|
{:focus false})
|
||||||
|
:buffer bufnr})))
|
||||||
|
|
||||||
(fn mod.maybe-enable-fixer [client bufnr]
|
(fn mod.maybe-enable-fixer [client bufnr]
|
||||||
(when client.resolved_capabilities.document_formatting
|
(when client.resolved_capabilities.document_formatting
|
||||||
|
|
Loading…
Reference in a new issue