Skip to content

triggers a registerCapability handler despite dynamicRegistration set to false #482

@yochem

Description

@yochem

Describe the bug
Bug in neovim when using vim-illuminate to highlight other uses of word under cursor in lua files. It does not highlight other words as it should. This bug is only in Lua files.

The following warning is in the logs:

[ WARN ] 2021-03-31T23:40:36+0200 ] ...AD-f89bfa6_2/share/nvim/runtime/lua/vim/lsp/handlers.lua:108 ]	"The language server sumneko_lua triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"

To Reproduce
Steps to reproduce the behavior:

  1. Use the latest neovim HEAD, and these packages (minimal vimrc):
vim.cmd('packadd packer.nvim')

return require('packer').startup(function(use)
    use 'neovim/nvim-lspconfig'
    use 'nvim-lua/completion-nvim'
    use 'RRethy/vim-illuminate'
end)


lsp.util.default_config = vim.tbl_extend("force", lsp.util.default_config, {
    on_attach = function(client)
        require'completion'.on_attach()
        require 'illuminate'.on_attach(client)
    end
})

lsp.sumneko_lua.setup {
    cmd = {
        '/Users/yochem/.local/bin/luals/bin/macOS/lua-language-server', '-E',
        '/Users/yochem/.local/bin/luals/main.lua'
    },
    settings = {
        Lua = {
            runtime = {version = 'LuaJIT', path = vim.split(package.path, ';')},
            diagnostics = {globals = {'vim'}},
            workspace = {
                library = {
                    [vim.fn.expand('$VIMRUNTIME/lua')] = true,
                    [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true
                }
            }
        }
    }
}
  1. Open a lua file
  2. type two of the same words, for example example example.
  3. Notice the other one does not get highlighted.

Expected behavior
The other words should be highlighted and the warning not reported

Screenshots
I think the log is sufficient, lmk otherwise.

Environment (please complete the following information):

  • OS: MacOS v11.2.3 (20D91)
  • Client: neovim v0.5.0-dev+f89bfa686

Additional context

Provide logs
Multiple times this log:
[ WARN ] 2021-03-31T23:40:36+0200 ] ...AD-f89bfa6_2/share/nvim/runtime/lua/vim/lsp/handlers.lua:108 ] "The language server sumneko_lua triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions