Skip to content

Conversation

@timfel
Copy link

@timfel timfel commented Nov 12, 2025

I find myself often loading vscode workspaces with multiple Java projects that have dependencies between one another, and require the use of custom Java runtimes and debugging settings.

Because of the way JDTLS works, the dependent project folders need to be "open" in the session at the same time, even though I don't usually have files from all projects open, so I add them into the jdtls hash. For the runtimes and debug settings, I just read from the code-workspace file's json config.

I find myself often loading vscode workspaces with multiple Java projects that have dependencies between one another, and require the use of custom Java runtimes and debugging settings.

Because of the way JDTLS works, the dependent project folders need to be "open" in the session at the same time, even though I don't usually have files from all projects open, so I add them into the jdtls hash. For the runtimes and debug settings, I just read from the code-workspace file's json config.
@timfel
Copy link
Author

timfel commented Nov 12, 2025

Looks to me like the failure is just a network problem?

(lsp-session-server-id->folders (lsp-session))))))
(lsp-session-folders (lsp-session))))

(advice-add #'lsp-load-vscode-workspace :after #'lsp-java--load-vscode-workspace)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned that using advice-add might be too aggressive. 🤔 It could potentially introduce side effects for other LSP clients.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, true. alternatively we just make it a new lsp-java-load-vscode-workspace function that calls the lsp-load-vscode-workspace itself, and then I just add that to the documentation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that's probably the best approach for now. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants