-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Description
Current Version
0.4.0
Use-cases
Currently the language server will walk through the hierarchy on initialize
and attempt to discover all initialized root modules and obtain the schema from all, so it can later be matched to files being opened in the editor.
There are scenarios where this may not be sufficient:
- User has multiple matching root modules and the one being automatically matched is not the one user wants to be matched
- We intend to make the detection more accurate as per Use module hierarchy proximity in finding relevant schema #179 and Use module version proximity in finding relevant schema #180 but getting it right may take time
- The root module in question is above the folder opened in the editor as root
Proposal
Allow the user to override the discovery mechanism by defining a list of paths to root modules.
This could be provided in the form of:
- CLI flags (e.g.
-root-module=/path/one -root-module=/path/two
etc.) - LSP settings - this has an added benefit of reacting to changes at runtime (adding/removing root module without having to restart the server)
Related LSP methods
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_configuration
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeConfiguration
References
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request