-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lsp: assert that a WorkspaceFolder must correspond to a CUE module
The restrictions on workspace folders for day 1 of 'cue lsp' are now updated at https://github.com/cue-lang/cue/wiki/cue-lsp. This CL enforces the requirement that a workspace folder must correspond directly to the root of a CUE module, and that furthermore a directory is defined as a module root if it contains a cue.mod/module.cue file (see the wiki for an explanation regarding this tightened requirement). Tests are added to verify we have enforced the check and that error messages are shown to the user as appropriate. The restriction on opening a single workspace folder already exists and is tested for. Whilst here, remove viewDefinition.cuemod. As the comment suggests it's superfluous. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I532fb698b738560ac3ac1badcccd5b4e250440c7 Dispatch-Trailer: {"type":"trybot","CL":1206614,"patchset":7,"ref":"refs/changes/14/1206614/7","targetBranch":"master"}
- Loading branch information
Showing
3 changed files
with
82 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters