LSP document symbols does not work · nvim-java · Discussion #412 · GitHub
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
-
Heading
-
Bold
-
Italic
-
Quote
-
Code
-
Link
-
Numbered list
-
Unordered list
-
Task list
-
Attach files
-
Mention
-
Reference
👍
1
reacted with thumbs up emoji
👎
1
reacted with thumbs down emoji
😄
1
reacted with laugh emoji
🎉
1
reacted with hooray emoji
😕
1
reacted with confused emoji
❤️
1
reacted with heart emoji
🚀
1
reacted with rocket emoji
👀
1
reacted with eyes emoji
Footer
You can’t perform that action at this time.
Uh oh!
There was an error while loading. Please reload this page.
{{title}}
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I've recently switched from nvim-jdtls to nvim-java (and from Telescope to FzfLua for better presentation) and for some reason LSP document symbols just does not work, FzfLua says [Fzf-lua] LSP: server does not support textDocument/documentSymbol. It did work with nvim-jdtls. Workspace symbols do work correctly, but I had to disable spring-boot-tools because this plugin's output is clearly meant to be used with some other tool and not FzfLua. Document symbols also work for other languages, for example Lua. Everything else I've tried so far (completions, debugging, running JUnits etc.) also works, just not document symbols. It's not a very big deal, but would be helpful when working in codebases with Java files going into thousands of lines.
I've tried some print debugging and found that :lua print(vim.lsp.get_clients({name="jdtls"})[1]:supports_method("textDocument/documentSymbol", 3)) prints false, but if I try :lua vim.print(vim.lsp.get_clients({name="jdtls"})[1]) it gives me this, which does not make sense for me:
My setup, some paths redacted. Neovim is installed via AppImage:
OS default Java:
My lspconfig loaded with lazy.nvim, written from scratch from various guides, not a distribution:
Output of :LspInfo on any random Java code after everything is loaded and built:
And ftplugin/java.lua:
Beta Was this translation helpful? Give feedback.