Skip to content

Commit 17f80c9

Browse files
committed
Autodiscover bundles
- automatically discover bundles located in lsp-java-server-install-dir/bundles
1 parent 09c7bb3 commit 17f80c9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lsp-java.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,12 @@ extract all or only the current occurrence."
575575
(interactive)
576576
(lsp-java-execute-matching-action "Import '.*'"))
577577

578+
(defun lsp-java--bundles ()
579+
"Get lsp java bundles."
580+
(let ((bundles-dir (lsp-java--bundles-dir)))
581+
(append lsp-java-bundles (when (file-directory-p bundles-dir)
582+
(directory-files bundles-dir t "\\.jar$")))))
583+
578584
(lsp-define-stdio-client lsp-java "java" (lambda () lsp-java-workspace-dir)
579585
(lsp-java--ls-command)
580586
:ignore-regexps
@@ -586,7 +592,7 @@ extract all or only the current occurrence."
586592
:settings (lsp-java--settings)
587593
:extendedClientCapabilities (list :progressReportProvider t
588594
:classFileContentsSupport t)
589-
:bundles lsp-java-bundles)
595+
:bundles (lsp-java--bundles))
590596
:initialize 'lsp-java--client-initialized)
591597

592598
(defun lsp-java-update-user-settings ()

0 commit comments

Comments
 (0)