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

Update all projects with JdtUpdateConfig #623

Closed gverger closed 4 months ago

gverger commented 4 months ago

Problem Statement

I have a maven project with sub modules that generate code.

At start, the plugin recompile all modules, but probably in the wrong order, which makes my code depending on generated code not compile. Running JdtUpdateConfig doesn't solve the problem, I have to go to the specific modules that generate code and run this command to make it work. But I have many of these modules.

Ideas or possible solutions

I see that JdtUpdateConfig calls update_project_config(), which only updates the current project (= module) configuration.

I have been able to solve my problem with update_projects_config({select_mode="all"}). In my project (maybe not that large), the time needed to update all configurations is not long.

I think it would make sense to bind JdtUpdateConfig to this function that refreshes all projects?

(oh and btw thanks A LOT to make it possible for me to code Java in my favorite editor)

mfussenegger commented 4 months ago

Makes sense to me to change it - that had crossed my mind before.

Done with https://github.com/mfussenegger/nvim-jdtls/pull/624 Note that I made it default to prompt, but you can use the bang operator to force all. :JdtUpdateConfig!