mfussenegger / nvim-jdtls

Extensions for the built-in LSP support in Neovim for eclipse.jdt.ls
GNU General Public License v3.0
979 stars 62 forks source link

Enable `didChangeWatchedFiles` by default? #606

Closed Frederick888 closed 5 months ago

Frederick888 commented 5 months ago

Problem Statement

In my case, jdt.ls needed it to sync src/main/resources/ files to bin/main/.

I'm working on a project that loads some conf files from resources/, which changes its behaviour. Example project: https://github.com/Frederick888/java-dummy/tree/gradle (I thought it was some vscode-java-test issue...). The issue can be reproduced if you try fixing the failing test.

So I updated the conf files, tweaked my integration tests, ran them, but they just kept failing. Also started a debugging session, thought something was wrong with conf loading. Then I realised ./gradlew test was ok, IntelliJ was ok, and to my surprise VSCode was ok too. Anyway it was some time down the drain...

Apparently it's needed in some other cases too https://github.com/mfussenegger/nvim-jdtls/issues/283#issuecomment-1602136955. I understand didChangeWatchedFiles support is still preliminary in Neovim, but I wonder given the fact jdt.ls uses it for these features, whether it's ok to enable it by default? I'm not terribly familiar with the development state of Neovim native LSP client, will it cause more problems than it solves?

Ideas or possible solutions

If we'd better wait for the feature to stabilise, maybe add a note in Wiki?

Frederick888 commented 5 months ago

Ah sorry, I just saw https://github.com/neovim/neovim/pull/23190 and the comments.

https://github.com/neovim/neovim/milestone/36 says 0.10.x will be out sometime in March. So perhaps it's ok to just wait.

mfussenegger commented 5 months ago

There are also some performance impliciations, see: https://github.com/neovim/neovim/issues/23291

I won't be changing the default in nvim-jdtls