You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: nvim-java is conflicting with mason regarding jdtls, java-test, and spring-boot-tools #379
I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.11
Operating system/version
Windows 10
Describe the bug
I have opened an issue on mason repository, but it seems that this bug is related to nvim-java.
When I open Neovim, its always tries to downgrade JDTLS from latest version (1.46) to version 1.43.0.
Another issue is that every Neovim start, either tries to upgrade, or to downgrade java-test and spring-boot-tools. Versions it's switching between are java-test versions 0.40.1 <-> 0.43.0, and for spring-boot-tools 1.55.1 <-> 1.59.0.
Steps To Reproduce
Install mason version 2.0
Install latest nvim-java
Enable jdtls
Enter Neovim
Exit Neovim
Enter Neovim
Expected Behavior
Expected behavior is for nvim-java not try to overwrite mason's installations.
You might want to consider adding the nvim-java Mason registry to your mason.nvim configuration. This can help resolve issues where Mason attempts to install a newer or incompatible version of certain nvim-java packages.
As described in the nvim-java troubleshooting guide, the default Mason registry may not include the required packages or might reference outdated paths.
Here's an example configuration that prioritizes the nvim-java registry:
This setup ensures that packages provided by nvim-java are correctly located and installed by Mason.
I tried this solution and it worked successfully.
Hopefully, it will be helpful for others too!
Update:
You can also use the following jdtls configuration to utilize a different version of the packages. However, the version recommended by nvim-java is likely the best option for compatibility and performance.
Closing this as duplicate. mason 2.0 will be tracked here. Right now we do not support mason 2.0 due an error we ran into while getting package version. #384
Activity
PKBurov commentedon May 13, 2025
I got the same exact thing
MinaJoh96 commentedon May 14, 2025
Same here
panmini commentedon May 15, 2025
You might want to consider adding the nvim-java Mason registry to your mason.nvim configuration. This can help resolve issues where Mason attempts to install a newer or incompatible version of certain nvim-java packages.
As described in the nvim-java troubleshooting guide, the default Mason registry may not include the required packages or might reference outdated paths.
Here's an example configuration that prioritizes the nvim-java registry:
{ 'mason-org/mason.nvim', opts = { registries = { 'github:nvim-java/mason-registry', 'github:mason-org/mason-registry', }, ui = { icons = { package_installed = '✓', package_pending = '➜', package_uninstalled = '✗', }, }, }, }This setup ensures that packages provided by nvim-java are correctly located and installed by Mason.
I tried this solution and it worked successfully.
Hopefully, it will be helpful for others too!
Update:
You can also use the following
jdtlsconfiguration to utilize a different version of the packages. However, the version recommended bynvim-javais likely the best option for compatibility and performance.s1n7ax commentedon May 17, 2025
Closing this as duplicate. mason 2.0 will be tracked here. Right now we do not support mason 2.0 due an error we ran into while getting package version.
#384