-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Go to definition emits errors and start another jdt instance upon keypress of a third party dependency and then open the definition #421
Comments
The errors are from |
Oh yes, indeed. it seems to be related to this: nvim-lualine/lualine.nvim#872 which itself is an upstream bug in neovim neovim/neovim#19464. But there is a weird issue, when I press the go to definition on a third party dependency it will start another jdt language server and then the diagnostics will get messed up in the buffer. |
The It's not part of your pasted configuration so maybe you're missing that |
It is actually here: -- This starts a new client & server,
-- or attaches to an existing client & server depending on the `root_dir`.
jdtls.start_or_attach(config) I was just testing it with another computer, and there it seems working fine. But there I just have a repository with single project layout. Then I went on to test it again in another computer, where I have a monorepo of multiproject layout. Then I thought that because I opened monorepo instead of opening a single project that whether that makes a difference. But unexpected I dont seem to get the jdt even running, anymore 🤯 Only thing I am getting now is:
|
If you have a monorepo with multiple projects, should it start a single jdt client per repo or for each an every sub project as seen below?
I have Java 17 and 11 installed, but it seems that it only works with java 11 or somehow does not launch for project with java 17. How does it select the runtime for the project? In config you can define the as many runetimes as one has available. |
That depends on how you set the |
Yeah, I seemed to get this actually working with help of a troubleshooting tip for removing the jdtls data and restart. Though I needed to remove the folder manually, because from nvim it said that there was no attached jdt clients so cannot proceed with the Though it seems bit fragile. If I change between branches and they have different set of files available and I have a buffer open for a file that exists in another branch but not in the first one. It easily get's to the corrupt state and I need to wipe data, and restart if not then reopen nvim again, which seems bit counter intuitive. Do you have any insight regarding this? Also the jdt quiting immediately, in one repository was caused because it was first run with java 11 and then in between I changed it to java 17. And then the outcome was that it was never fully changed. But when I removed the data dir and the configs the jdt adds (eclipse files .classpaht, .project, .settings) it started working upon next nvim restart. I believe this issue can be closed. |
It shouldn't corrupt the state, usually restart should be enough. The reason is that the server isn't informed about the file changes by the client, because the client doesn't detect them. This should improve once neovim/neovim#21293 is finished. |
LSP client configuration
Eclipse.jdt.ls version
1.19.0
Steps to Reproduce
Press go to definition on third party class. E.g. any class that is coming from another maven dependency.
Expected Result
Would directly go to the definition of a dependency.
Actual Result
It will emit errors and start another jdt language server and then go to the definition.
The text was updated successfully, but these errors were encountered: