Did you check docs and existing issues?
Neovim version (nvim -v)
0.11.2
Operating system/version
Linux
Describe the bug
Invalid mason registry verification fails even when nvim-java registry is configured correctly.
This setup to exit early, preventing nvim-java from setting up correctly.
It happens because the startup check is performed before the registry is added to Mason.
I uncovered this issue while migrating that part to Mason 2.0.. It perhaps have been hiding behind the invalid_mason_registry verification being default disabled in the configuration.
The fix is extracting the registry setup code from java.startup.mason-dep.install into a separate function and calling it in java.setup prior to the startup check. I have a PR coming.
Steps To Reproduce
- Enable invalid mason registry verification:
require('java').setup {
verification = { invalid_mason_registry = true }
}
- Start Neovim
- The following text error message is printed:
nvim-java mason registry is not added correctly!
This occurs when mason.nvim configured incorrectly
Please refer the link below to fix the issue
https://github.com/nvim-java/nvim-java/wiki/Q-&-A#no_entry-cannot-find-package-xxxxx
Expected Behavior
Neovim starts without error messages regarding mason repository verification.
Did you check docs and existing issues?
Neovim version (nvim -v)
0.11.2
Operating system/version
Linux
Describe the bug
Invalid mason registry verification fails even when nvim-java registry is configured correctly.
This setup to exit early, preventing nvim-java from setting up correctly.
It happens because the startup check is performed before the registry is added to Mason.
I uncovered this issue while migrating that part to Mason 2.0.. It perhaps have been hiding behind the invalid_mason_registry verification being default disabled in the configuration.
The fix is extracting the registry setup code from
java.startup.mason-dep.installinto a separate function and calling it injava.setupprior to the startup check. I have a PR coming.Steps To Reproduce
Expected Behavior
Neovim starts without error messages regarding mason repository verification.