Make java and neotest config portable

jdtls hardcoded /Library/Java/JavaVirtualMachines paths, which resolve to
nothing off macOS; discover JDKs across the macOS, Linux and sdkman roots
instead and only declare runtimes that exist. neotest-mocha passed `docker exec
-it`, which hangs without a TTY, and hardcoded the container name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 12:27:20 -04:00
co-authored by Claude Opus 5
parent d805ae3ee4
commit cf36c2f164
2 changed files with 43 additions and 11 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ return {
return {
adapters = {
["neotest-mocha"] = {
command = "docker exec -it api-sandbox npm run test:integration",
command = "docker exec " .. (vim.env.NEOTEST_MOCHA_CONTAINER or "api-sandbox") .. " npm run test:integration",
command_args = function(context)
-- The context contains:
-- results_path: The file that json results are written to