-
Notifications
You must be signed in to change notification settings - Fork 35
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
Language server initialisation adjustments #580
Conversation
this is unused and behaves differently in different clients, see #578 Signed-off-by: Charlie Egan <charlie@styra.com>
This disables features that make use of the Root URI, namely the linting of more than one file, use of config file, and linting of unopened files. This is only used when a language server is started with no client root URI. Signed-off-by: Charlie Egan <charlie@styra.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just one question.
} | ||
|
||
// attempt to load the config as it is found on disk | ||
file, err := config.FindConfig(strings.TrimPrefix(l.clientRootURI, "file://")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was file:// not an issue on windows? Or it’s not applicable here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, need to double check this. Will save a TODO for this.
When VS code starts, there is an issue where the configuration is 'changed' multiple times during start-up. This happened too quickly for the activatedRegal function to reliably test if regal was running already and caused many servers to be started. This meant that sometimes messages would be duplicated since many servers would send the same message. The minimum regal version has also been bumped, to contain fixes for non-workspaced vs code instances. (see StyraInc/regal#580) Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
When VS code starts, there is an issue where the configuration is 'changed' multiple times during start-up. This happened too quickly for the activatedRegal function to reliably test if regal was running already and caused many servers to be started. This meant that sometimes messages would be duplicated since many servers would send the same message. The minimum regal version has also been bumped, to contain fixes for non-workspaced vs code instances. (see StyraInc/regal#580) Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
When VS code starts, there is an issue where the configuration is 'changed' multiple times during start-up. This happened too quickly for the activatedRegal function to reliably test if regal was running already and caused many servers to be started. This meant that sometimes messages would be duplicated since many servers would send the same message. The minimum regal version has also been bumped, to contain fixes for non-workspaced vs code instances. (see StyraInc/regal#580) Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com> Co-authored-by: Charlie Egan <charlieegan3@users.noreply.github.com>
* Drop InitializationOption from config this is unused and behaves differently in different clients, see StyraInc#578 Signed-off-by: Charlie Egan <charlie@styra.com> * Run LS in workspaceless mode when no root URI set This disables features that make use of the Root URI, namely on the linting of more than one file, use of config file, and linting of unopened files. This is only used when a language server is started with no client root URI. Signed-off-by: Charlie Egan <charlie@styra.com> --------- Signed-off-by: Charlie Egan <charlie@styra.com>
This PR makes two changes: