Multiple workspaces with separated config/cache directories
dschrempf opened this issue · 6 comments
Hi!
I am used to running separate language servers for separate projects (==workspaces in jdtls language?) in one Emacs session. Is this possible with lsp-java
and jdtls
? I can configure lsp-java
to load one workspace, then restart Emacs (and kill all remaining java daemons/processes), then load another workspace.
However, when I load two workspaces in one Emacs session the newly loaded workspace is added to the other jdtls
instance, instead of running a new instance.
Is it possible to have serparate jdtls
instances serving separate workspaces at the same time?
Thank you for your help.
At this point, this is not possible, because lsp-java, dap-java are expecting a single jdtls instance.
Thank you for your reply. So how would one then work with two projects and different Java installations? I read something about lsp-save-vscode-workspace
but I have no idea how this works.
you mean different java versions? IOW what is the problem you are trying to solve
I am trying to develop projects with different versions of jdtls
and different versions of the jdk
in the same Emacs session.
The different versions of the jdk can be controlled by #254 (comment)
Why do you need different jdtls versions?
Thanks for your replies! The links are really informative, and the suggestions worked. I think this should be documented in the project readme but I understand that this is a lot of work.
The only worry I still have is that all projects use the same -configurtion
and -data
directories (as well as the same lsp-java-workspace-cache-dir
). jdtls
recommends having separate folders. See, e.g., https://github.com/eclipse/eclipse.jdt.ls#running-from-the-command-line.