Skip to content

Commit e9b9030

Browse files
committed
Pass workspace folders in initialization options
1 parent 311a074 commit e9b9030

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
@@ -888,7 +888,13 @@ PROJECT-URI uri of the item."
888888
(list :settings (lsp-java--settings)
889889
:extendedClientCapabilities (list :progressReportProvider t
890890
:classFileContentsSupport t)
891-
:bundles (lsp-java--bundles)))
891+
:bundles (lsp-java--bundles)
892+
:workspaceFolders (->> (lsp-session)
893+
lsp-session-server-id->folders
894+
(gethash 'jdtls)
895+
(-uniq)
896+
(-map #'lsp--path-to-uri)
897+
(apply #'vector))))
892898
:library-folders-fn (lambda (_workspace) (list lsp-java-workspace-cache-dir))
893899
:before-file-open-fn (lambda (workspace)
894900
(let ((metadata-file-name (lsp-java--get-metadata-location buffer-file-name)))

0 commit comments

Comments
 (0)