-
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
Fix Partial Configuration Bug #258
Fix Partial Configuration Bug #258
Conversation
yamlConfigurationSettings = settings.yaml.schemas; | ||
yamlShouldValidate = settings.yaml.validate; | ||
yamlShouldHover = settings.yaml.hover; | ||
yamlShouldCompletion = settings.yaml.completion; |
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.
These were overwritten if, e.g., yaml.validate.enabled
was not specified in the configuration message.
Hmm after looking at it again I think there might be a small bug here: if settings.yaml.validate is undefined it will take the value of yamlShouldValidate ✔️ but I think we might have to do something like That way of settings.yaml.validate is undefined it uses yamlShouldValidate |
You're absolutely right, I got the configuration object confused with that of another language server 😅 I think those ternary operators would still cause a problem though — if What about just checking for the property: if (settings.yaml.hasOwnProperty('validate') {
yamlShouldValidate = settings.yaml.validate
} |
Oh right 😅 I think just checking the property should suffice then! In that case, if its undefined then nothing changes and if it is defined then it changes to whatever it was defined as |
Alright, it's a little more verbose but I feel like that should work 👍 |
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.
Looks good from my side 👍
Do you all have an idea of when you might next publish an NPM release? Would be great to have these configs available sooner than later, but it's not a big deal either way. Thanks for letting me help! |
Hopefully in the next week or so, there's a decent amount of stuff that needs to be released now |
Small patch to fix #256.
When submitting partial settings objects to the language server using the
onDidChangeConfiguration
listener, the server was overwriting its default values with null values for every unspecified parameter.