-
Notifications
You must be signed in to change notification settings - Fork 79
project root != language server rootΒ #233
Description
Let's imagine several projects combined in one large git repository. Each of these projects has their own root folder in this repo. They are all related to each other so it makes sense to open them in 1 atom instance instead of opening several atom instances and switching between them.
AFAIK this is currently not supported by the AutoLanguageClient
because the server always takes the atom root folder as projectPath
that is then passed to the startServerProcess
function.
There is already the determineProjectPath
function on the ServerManager
:
atom-languageclient/lib/server-manager.ts
Lines 257 to 263 in 606faa3
public determineProjectPath(textEditor: TextEditor): string | null { | |
const filePath = textEditor.getPath(); | |
if (filePath == null) { | |
return null; | |
} | |
return this._normalizedProjectPaths.find((d) => filePath.startsWith(d)) || null; | |
} |
If this can be overwritten by the AutoLanguageClient
in some way then I think the above mentioned problem is fixed.
What do you think? I think I can prepare a PR for this.
/cc @damieng