Skip to content

fix: use pointers for optional LSP settings [IDE-899] #811

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

Merged
merged 6 commits into from
Apr 17, 2025

Conversation

rrama
Copy link
Contributor

@rrama rrama commented Mar 25, 2025

Description

Previously we had no way to distinguish between the settings object being omitted and being set to "empty" value for the struct. As such we were ignoring settings objects that were set to the same as the "empty" struct value, as it would have broken / overridden the default LSP settings for clients that did not support the setting. With this change to using pointers, we can distinguish between a client not sending the settings object (because they don't support it yet) and a client sending the settings object but deliberately setting the values to be the same as the empty struct.

Checklist

  • Tests added and all succeed
  • Linted
  • README.md updated, if user-facing
  • License file updated, if new 3rd-party dependency is introduced
  • N/A

Previously we had no way to distinguish between the settings object being omitted and being set to "empty" value for the struct.
As such we were ignoring settings objects that were set to the same as the "empty" struct value, as it would have broken / overridden the default LSP settings for clients that did not support the setting.
With this change to using pointers, we can distinguish between a client not sending the settings object (because they don't support it yet) and a client sending the settings object but deliberately setting the values to be the same as the empty struct.
@rrama rrama changed the title fix: WIP use pointers for optional LSP settings [IDE-899] fix: use pointers for optional LSP settings [IDE-899] Apr 8, 2025
@rrama rrama marked this pull request as ready for review April 8, 2025 10:34
@rrama rrama requested a review from a team as a code owner April 8, 2025 10:34
Copy link
Contributor

@acke acke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick on the helper function. And pr looks good to me.

@rrama rrama merged commit f26d123 into main Apr 17, 2025
18 checks passed
@rrama rrama deleted the fix/pointer-settings-objects branch April 17, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants