mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 19:30:01 +02:00
nvim: lsp: use client.supports_method() instead of client.server_capabilities.
works better for some reason.
This commit is contained in:
parent
141d1fb960
commit
6efa099fd8
1 changed files with 3 additions and 3 deletions
|
|
@ -72,15 +72,15 @@ return {
|
|||
local on_attach = function(client, bufnr)
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
|
||||
if features.inlay_hints.enabled and client.server_capabilities.inlayHintProvider then
|
||||
if features.inlay_hints.enabled and client.supports_method("textDocument/inlayHint") then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
||||
end
|
||||
|
||||
if features.codelens.enabled and client.server_capabilities.codeLensProvider then
|
||||
if features.codelens.enabled and client.supports_method("textDocument/codeLens") then
|
||||
utils.codelens(augroup, bufnr)
|
||||
end
|
||||
|
||||
if features.document_highlight.enabled and client.server_capabilities.documentHighlightProvider then
|
||||
if features.document_highlight.enabled and client.supports_method("textDocument/documentHighlight") then
|
||||
utils.document_highlight(bufnr)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue