feat(java): allow overriding test config (#3891)

## What is this PR for?

Allow overriding java test config

## Does this PR fix an existing issue?

NO

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
This commit is contained in:
kezhenxu94
2024-07-08 02:50:13 +08:00
committed by GitHub
parent f3c93701e7
commit 8b2eacb6ac

View File

@ -225,8 +225,18 @@ return {
-- custom keymaps for Java test runner (not yet compatible with neotest)
wk.register({
["<leader>t"] = { name = "+test" },
["<leader>tt"] = { require("jdtls.dap").test_class, "Run All Test" },
["<leader>tr"] = { require("jdtls.dap").test_nearest_method, "Run Nearest Test" },
["<leader>tt"] = {
function()
require("jdtls.dap").test_class({ config_overrides = opts.test.config_overrides })
end,
"Run All Test",
},
["<leader>tr"] = {
function()
require("jdtls.dap").test_nearest_method({ config_overrides = opts.test.config_overrides })
end,
"Run Nearest Test",
},
["<leader>tT"] = { require("jdtls.dap").pick_test, "Run Test" },
}, { mode = "n", buffer = args.buf })
end