feat(java): allow opts for setup_dap_main_class_configs()

[1] 382b9f6258/doc/jdtls.txt (L206-L210)
This commit is contained in:
Frederick Zhang 2024-02-21 23:48:25 +11:00
parent 91126b9896
commit 06d1e45833
No known key found for this signature in database
GPG key ID: 746EA01EB9912CBC

View file

@ -104,6 +104,7 @@ return {
-- These depend on nvim-dap, but can additionally be disabled by setting false here. -- These depend on nvim-dap, but can additionally be disabled by setting false here.
dap = { hotcodereplace = "auto", config_overrides = {} }, dap = { hotcodereplace = "auto", config_overrides = {} },
dap_main = {},
test = true, test = true,
} }
end, end,
@ -198,7 +199,7 @@ return {
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
-- custom init for Java debugger -- custom init for Java debugger
require("jdtls").setup_dap(opts.dap) require("jdtls").setup_dap(opts.dap)
require("jdtls.dap").setup_dap_main_class_configs() require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)
-- Java Test require Java debugger to work -- Java Test require Java debugger to work
if opts.test and mason_registry.is_installed("java-test") then if opts.test and mason_registry.is_installed("java-test") then