Neovim-from-scratch
Neovim-from-scratch copied to clipboard
Lsp config deprecated setting regarding accessing client.resolved_capabilities setting
On starting neovim 0.8, and after applying lsp related updates in your repo, I still get the following error:
The is due to the following codeblock in lsp/handlers.lua file:
local function lsp_highlight_document(client)
-- Set autocommands conditional on server_capabilities
if **_client.resolved_capabilities._**document_highlight then
vim.api.nvim_exec(
[[
augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]],
false
)
end
end
@drusmanbashir This commit https://github.com/LunarVim/Neovim-from-scratch/pull/144/commits/fc52e86ef482c2db5a7b75707a407730245d3a63 in PR #144 will fix the error if you want to manually edit your handlers.lua
There's a simpler fix. Just replace with following: -- if client.resolved_capabilities.document_highlight then if client.server_capabilities.documentHighlightProvider then
Similarly, -- client.resolved_capabilities.document_formatting = false client.server_capabilities.documentFormattingProvider = false