Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

triggers a registerCapability handler despite dynamicRegistration set to false #482

Closed
yochem opened this issue Mar 31, 2021 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@yochem
Copy link

yochem commented Mar 31, 2021

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"

@yochem yochem changed the title The language server sumneko_lua triggers a registerCapability handler despite dynamicRegistration set to false triggers a registerCapability handler despite dynamicRegistration set to false Mar 31, 2021
@sumneko sumneko added the bug Something isn't working label Apr 1, 2021
@sumneko sumneko closed this as completed in e5947d5 Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants