LunarVim / Neovim-from-scratch

📚 A Neovim config designed from scratch to be understandable
https://www.chrisatmachine.com/
GNU General Public License v3.0
5.4k stars 1.17k forks source link

client.resolved_capabilities is deprecated #142

Closed gnmearacaun closed 2 years ago

gnmearacaun commented 2 years ago

this is giving the following error:

[LSP] Accessing client.resolved_capabilities is deprecated, update your 
plugins or configuration to access client.server_capabilities instead.
The new key/value pairs in server_capabilities directly match those 
defined in the language server protocol

It seemed obvious to change client.resolved_capabilities to client.server_capabilities. The error went away however treesitter highlight stopped working, so a better fix is out there.

gnmearacaun commented 2 years ago

I noticed Chris has changed the function in his personal config to (gets rid of errors too)

local function lsp_highlight_document(client)
  -- if client.server_capabilities.document_highlight then
    local status_ok, illuminate = pcall(require, "illuminate")
    if not status_ok then
      return
    end
    illuminate.on_attach(client)
  -- end
end
gnmearacaun commented 2 years ago

temporary fix

gnmearacaun commented 2 years ago

moved to pull request https://github.com/LunarVim/Neovim-from-scratch/pull/144