From bf17229fce577172c4886ba8f4d6ea22fd0766b1 Mon Sep 17 00:00:00 2001 From: Zapan Date: Thu, 17 Jul 2025 21:01:01 +0800 Subject: [PATCH] feat(extra): allow users to add custom bundles through opts.init_options.bundles to jdtls --- lua/lazyvim/plugins/extras/lang/java.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 8098b6b3..6bcc7802 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -148,6 +148,12 @@ return { -- Find the extra bundles that should be passed on the jdtls command-line -- if nvim-dap is enabled with java debug/test. local bundles = {} ---@type string[] + + -- Allow users to add custom bundles through opts.init_options.bundles + if opts.init_options and opts.init_options.bundles then + vim.list_extend(bundles, opts.init_options.bundles) + end + if LazyVim.has("mason.nvim") then local mason_registry = require("mason-registry") if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then