Skip to content

LSP: Refresh internal caches when settings are updated #1273

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 3 commits into from
Mar 19, 2025

Conversation

thecrypticace
Copy link
Contributor

We use the pull model (workspace/configuration) to get settings for a document and we cache these internally so we don't repeat these calls multiple times for a given request. We're set up to listen for configuration refresh notifications and update the project settings when we get them.

Unfortunately, we didn't actually register for these notifications, so we never got them. This meant that if you changed the settings for an already opened file or workspace folder, the language server would not react to these changes. This PR fixes this by registering for configuration change notifications and now open files with color decorators, completions, etc… should react to changes in the settings as needed.

If settings are updated and our langauge server doesn't react to or handle these changes, it is definitely a bug. Hopefully this will squash all of those particular ones but… we'll see. 😅

@thecrypticace thecrypticace changed the title LSP: Refresh projects when VSCode settings update LSP: Refresh internal caches when VSCode settings update Mar 19, 2025
@thecrypticace thecrypticace changed the title LSP: Refresh internal caches when VSCode settings update LSP: Refresh internal caches when settings are updated Mar 19, 2025
@thecrypticace thecrypticace force-pushed the fix/refresh-on-settings-change branch from 0f54cc4 to 3f29193 Compare March 19, 2025 15:35
@thecrypticace thecrypticace merged commit 2f41b83 into main Mar 19, 2025
@thecrypticace thecrypticace deleted the fix/refresh-on-settings-change branch March 19, 2025 15:48
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.

1 participant