Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] Is the contract of lsp4e to tie the rootURI of the language server to each Eclipse project instead of the Eclipse workspace?

Hi,

This is a question I raised too at https://bugs.eclipse.org/bugs/show_bug.cgi?id=510433, but I couldn't find a solution that works without making the server aware that it is using the eclipse client. 

The short story is that the workspace root is not a good value to use as rootUri either, because the projects might not be physically located in that folder, so a way to navigate the workspace is needed and down the rabbit hole we go.

The least intrusive way I can think of is to rely on the server recognizing the project's configuration and its dependencies (which it might have to do anyway) and have the client just spawn a server for each cluster of inter-dependent projects. Then the rootUri is not really a root anymore, but that might be ok. 

best regards,
Vlad


On Fri, Feb 24, 2017 at 3:18 AM, Nick Chen <nchen.dev@xxxxxxx> wrote:
Looking at http://git.eclipse.org/c/lsp4e/lsp4e.git/tree/org.eclipse.lsp4e/src/org/eclipse/lsp4e/ProjectSpecificLanguageServerWrapper.java it seems that if there is a viable Language Server, it will create one server for that particular project.
More concretely, it sets the rootUri to the location of the project, and not the workspace.

initParams.setRootUri(project.getLocation().toFile().toURI().toString());

Simple question: Is the use of project (vs workspace) the contract for lsp4e moving forward? Just need to know so that I can handle things properly on my end.

FWIW, I think this fits well with how VSCode does it for each rootFolder, although in the lsp4e implementation, you could have a proliferation of language servers for each Eclipse workspace.


Nick
_______________________________________________
lsp4e-dev mailing list
lsp4e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/lsp4e-dev


Back to the top