nvim: update config for 0.8.0

lsp: replace resolved_capabilities with server_capabilities
This commit is contained in:
tastytea 2022-10-02 21:26:04 +02:00
parent a8ece74398
commit c9a192ba76
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -27,7 +27,7 @@ local on_attach = function(client, bufnr)
map('n', '<Leader>lf', vim.lsp.buf.formatting, 'Format buffer', bufnr)
-- highlight symbol under cursor
if client.resolved_capabilities.document_highlight then
if client.server_capabilities.documentHighlightProvider then
vim.api.nvim_create_augroup('config_lsp', { clear = false })
vim.api.nvim_clear_autocmds({
buffer = bufnr,
@ -60,7 +60,7 @@ local on_attach = function(client, bufnr)
end
-- -- show help on hover
-- if client.resolved_capabilities.hover then
-- if client.server_capabilities.hoverProvider then
-- vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
-- group = 'config_lsp',
-- buffer = bufnr,