fix(java): use builtin nvim 0.10 "go to definition/declaration" function
📑 Description
Using Neovim 0.10 and java-pack, the default keybinding for go to definition "gd" and go to declaration "gD" is no longer working.
The following error message is shown:
[telescope.builtin.lsp_*]: server does not support definitionProvider
To fix this the default "gd" and "gD" need to be mapped to the following command:
vim.lsp.buf.definition()
vim.lsp.buf.declaration()
List of changes:
- [x] added config to override default telescope "gd" and "gD" key binding.
Review Checklist
Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:
Proper conventional commit scoping:
-
If you are adding a new plugin, the scope would be the name of the category it is being added into. ex.
feat(utility): added noice.nvim plugin -
If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex.
fix(noice-nvim): fix LSP handler error -
[ ] Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above
-
[ ]
READMEis properly formatted and uses fenced in links with<url>unless they are inside a[title](url) -
[ ] Proper usage of
optstable rather than setting things up with theconfigfunction.
are these functions only available on neovim 0.10?
@Uzaaft
I thought it was new to 0.10 but it was also available in 0.9.5. I never had to look for it in 0.9.5 as it was working just fine.
After some more googling, I think this is more of a Telescope issue: https://github.com/nvim-telescope/telescope.nvim/issues/2898#issuecomment-2117962082
I'm fine with this changes not included in the pack. I can modify my own keymaps until Telescope release a fix.
I'm not sure if this is affecting other LSP's though. If it is then maybe we should change default "gd" and "gD" behavior in the core?
Telescope has released a new version with this fix
@mehalter Sorry, but this issue is still happening in telescope v0.1.7. Tested on jdtls and gopls project, got the same error. Works fine with ts/js project though.
Edit: nvm it works after I did a clean reinstallation of astronvim :)