-
Notifications
You must be signed in to change notification settings - Fork 274
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
Defaults for didChangeConfiguration Messages #256
Labels
Comments
trajamsmith
changed the title
Defaults for didChangeConfiguration Message
Defaults for didChangeConfiguration Messages
Apr 30, 2020
Yeah it looks like that's correct, partial configurations don't seem to be working correctly |
May I submit a PR for this? This fixes the issue on my local: // change this
if (settings.yaml) {
yamlConfigurationSettings = settings.yaml.schemas;
yamlShouldValidate = settings.yaml.validate;
yamlShouldHover = settings.yaml.hover;
yamlShouldCompletion = settings.yaml.completion;
customTags = settings.yaml.customTags ? settings.yaml.customTags : [];
// to this
if (settings.yaml) {
yamlConfigurationSettings = settings.yaml.schemas || yamlConfigurationSettings;
yamlShouldValidate = settings.yaml.validate || yamlShouldValidate;
yamlShouldHover = settings.yaml.hover || yamlShouldHover;
yamlShouldCompletion = settings.yaml.completion || yamlShouldCompletion;
customTags = settings.yaml.customTags ? settings.yaml.customTags : []; |
Merged
4 tasks
Yeah! A PR would be great! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey — we're trying to extend the functionality of JupyterLab to include all the features that language servers provide. At present, we're taking a look at server configuration messages. Right now, our
onDidChangeConfiguration
messages to a few server implementations are working well, but we're having small issues with theyaml-language-server
.We want our settings objects in the JupyterLab editor look something like this:
We'd like to be able to send partial configurations like the above, but I believe the issue we're having is that the
onDidChangeConfiguration
listener for the YAML server doesn't like partial configurations.My best guess is that this is because there are no defaults here:
So if we send the configuration settings like I've written them up top, then the server turns off validation, even though my configuration object didn't mention validation.
Is that hunch correct? It's very possible that we're just looking at this the wrong way.
The text was updated successfully, but these errors were encountered: