Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-root workspace support #11

Open
RichardFurness opened this issue Oct 9, 2019 · 2 comments
Open

Multi-root workspace support #11

RichardFurness opened this issue Oct 9, 2019 · 2 comments

Comments

@RichardFurness
Copy link

This extension doesn't seem to support multi-root workspaces. If I have a workspace with multiple folders, I find that the Yang LS runs only in one of these folders (the one appearing first in the workspace file). It therefore doesn't parse the Yang modules in the remaining folders (unless I explicitly open them). This leads to errors like failing to find imported modules.

It seems like a fairly simply solution would be to run multiple instances of the LS, one per folder. Then the per-folder yang.settings can be used to specify the include path to handle dependencies between the folders. Of course, this might result in some modules being processed by both instances, so isn't ideal but is better than nothing.

It would be better if it could be handled using a single LS instance, but I can imagine this might require changes to the LS itself (to support multiple roots).

@nckbgov
Copy link

nckbgov commented Mar 5, 2021

To manage such situations
with the actual state of the extension,
I specify external modules in the settings files:

~/.yang/yang.settings

{
"yangPath": "/my/home/yang/libs/rift.zip"
}

More about this:

https://github.com/theia-ide/yang-lsp/blob/master/docs/Settings.md

@gorshkov-leonid
Copy link

I have the next use case:
Eclipse Che 7.34.1 uses almost the latest version of Theia (an online editor that implements in browser functionality of vscode). If I may say so, multi-root is required to be supported in LS in Theia to convenient work. For example, I can clone GIT repository and it will be added as a root folder to my workspace by default. How to explain to a user, that it is a prohibited action...

I started searching and found that multi-roots are supported in xtext 2.21.0. But latest version yang-vscode uses yang-lsp that uses xtext 2.20.0 that a priory is not containing multi-root support.

let me refer to developers names here that could say something here:
@JanKoehnlein, @kittaakos, @dhuebner

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

No branches or pull requests

3 participants