navigator.lua
navigator.lua copied to clipboard
Unable to use with Lazy.nvim starter
Hi,
I am very new with neovim and I am having the following error after installing navigator.lua
vim.lsp.handlers["textDocument/hover"]` has been overwritten by another plugin?
Either disable the other plugin or set `config.lsp.hover.enabled = false` in your **Noice** config.
- plugin: nvim
- file: /opt/homebrew/Cellar/neovim/0.10.0/share/nvim/runtime/lua/vim/lsp.lua
- line: 1159
Can you please tell me what needs to be done and how to solve it?
I have not seen this so far. What operation triggered this issue? Is it reproducible with the sample init.lua
It seems to working with this init.lua but I am not sure how to check properly.
Here is my config with navigator activated. https://github.com/aleyrizvi/nvim-config
the plugin is in https://github.com/aleyrizvi/nvim-config/blob/main/lua/plugins/navigator.lua
Looks like you have mason installed/configed Please check the README.md regarding how to setup to work with mason.
I got this error message too (I'm also using LazyVim). If you follow the instructions in the error message, it goes away, though that also partly disables noice.nvim
I can only assume that navigator also sets vim.lsp.handlers, correct @ray-x ?
Here's an example config to 'fix' the error:
return
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
lsp = {
hover = {
enabled = false,
},
signature = {
enabled = false,
},
},
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
"rcarriga/nvim-notify",
},
}
Found it: https://github.com/ray-x/navigator.lua/blob/3be5241bf902b8492ce3923cb62d9b44c4831b59/lua/navigator/lspclient/mapping.lua#L454
I actually get a second error (see screenshot), hence the two settings in the example above, but I can't see that navigator sets the second one, except in playground/init.lua
look like hover&signature is not disabled in noice config. You can alternatively disable hover in navigator/init.lua.