LanguageClient change directory of server process to workspace

Hi again,

so maybe I’m missing something obvious, but I suspect that the LSP server process is not launched with the workspace as cwd but somewhere else.

I don’t see a way to change the current directory via the LanguageClient serverOptions, and the lsp needs to be started in the source root folder. Any ideas how to do that?

O

PS: never mind, I found by taking a wild guess that there is an undocumented cwd option similar to debug task invocation already

Ah, darn. Yeah that should be documented and has been supported since I can remember. I’ll get that done with our next set of documentation updates. Thank you!

1 Like