Skip to content

feat(tools): allow specifying paths instead of auto installing#488

Open
olisikh wants to merge 3 commits intonvim-java:mainfrom
olisikh:feat/tools_paths_over_auto_install
Open

feat(tools): allow specifying paths instead of auto installing#488
olisikh wants to merge 3 commits intonvim-java:mainfrom
olisikh:feat/tools_paths_over_auto_install

Conversation

@olisikh
Copy link
Copy Markdown

@olisikh olisikh commented Apr 18, 2026

This PR adds extra configuration property per each tool called path.

If the path is specified, nvim-java tries to resolve the tool by the path, if it can't and auto_install = true, it would download it, if auto_install = false an error would be shown.

The cache path is computed with extra hash to avoid cache collisions when switching tools. If java is auto-installed, the old cache path strategy is used (no hashing for backward compatiblity).

Some (or all?) jdtls distributions do not have config_mac_arm file, only config_mac making jdtls to fail instantly.
Instead of failing instantly another attempt is made to resolve config by OS name.

I believe this is an important change for people who do not like their tools downloaded randomly from the internet.
This change should not have any breaking changes, but don't take my words for granted. I have tested this change and it works well.

Would be happy to hear back and adjust if necessary, thanks a bunch!

@kraftnix
Copy link
Copy Markdown

kraftnix commented May 6, 2026

I am currently using this and is semi-required for a nice working setup of nvim-java with NixOS (from what I can tell).

It works well (although I haven't tested the vscode extensions since I leave those disabled).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants