1
0
Fork 0

nvim: Remove client.resolved_capabilities LSP references

This commit is contained in:
Daniel Kempkens 2022-04-17 22:26:10 +02:00
parent 3d167d8bf9
commit 8cfa528f3e
2 changed files with 5 additions and 5 deletions

View file

@ -25,7 +25,7 @@
:buffer bufnr})))
(fn mod.maybe-enable-fixer [client bufnr]
(when client.resolved_capabilities.document_formatting
(when client.server_capabilities.documentFormattingProvider
(api.nvim_buf_set_var bufnr :nifoc_fixer_enabled 1)
(lsp-format.on_attach client bufnr)))

View file

@ -5,17 +5,17 @@
cmp (require :cmp_nvim_lsp)
diagnostic (require :nifoc.diagnostic)]
(fn custom-attach [client bufnr]
(when client.resolved_capabilities.document_symbol
(when client.server_capabilities.documentSymbolProvider
(lsp_status.on_attach client bufnr))
(when client.resolved_capabilities.document_highlight
(when client.server_capabilities.documentHighlightProvider
(illuminate.on_attach client bufnr))
(when client.resolved_capabilities.code_lens
(when client.server_capabilities.codeLensProvider
(virtual-types.on_attach client bufnr))
(diagnostic.maybe-enable-lsp client bufnr)
(diagnostic.maybe-enable-fixer client bufnr))
(fn custom-attach-no-format [client bufnr]
(set client.resolved_capabilities.document_formatting false)
(set client.server_capabilities.documentFormattingProvider false)
(custom-attach client bufnr))
;; Setup