lsp: Fix duplicate workspace/didChangeConfiguration notifications - #56853
Merged
SomeoneToIgnore merged 1 commit intoMay 29, 2026
Merged
Conversation
Editing the `lsp` section of `.zed/settings.json` caused two identical
`workspace/didChangeConfiguration` notifications to be sent to each
language server, e.g.:
// Send:
{"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"jetls":{"code_lens":{"references":true},"completion":{"method_signature":{"prepend_inference_result":true}},"full_analysis":{"debounce":2},"inlay_hint":{"block_end":{"min_lines":25}}}}}}
// Send:
{"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"jetls":{"code_lens":{"references":true},"completion":{"method_signature":{"prepend_inference_result":true}},"full_analysis":{"debounce":2},"inlay_hint":{"block_end":{"min_lines":25}}}}}}
`maintain_workspace_config` observed `SettingsStore` directly while
`on_settings_changed` also fed the same loop through
`request_workspace_config_refresh`, so every settings change drove the
refresh loop twice and sent two identical
`workspace/didChangeConfiguration` notifications to each language server.
Drop the in-loop observer and drive the loop from
`external_refresh_requests` alone. Settings changes still arrive via
`on_settings_changed -> request_workspace_config_refresh`, and toolchain
activation continues to use the same channel.
aviatesk
force-pushed
the
fix-duplicated-workspace-configuration
branch
from
May 27, 2026 07:30
824de04 to
3f935d6
Compare
Collaborator
Author
|
@SomeoneToIgnore I'm afraid pinging you directly, but could you review this PR when you get a chance? |
SomeoneToIgnore
approved these changes
May 29, 2026
SomeoneToIgnore
left a comment
Contributor
There was a problem hiding this comment.
Nice catch, thank you.
TomPlanche
pushed a commit
to TomPlanche/zed
that referenced
this pull request
Jun 2, 2026
…d-industries#56853) Editing the `lsp` section of `.zed/settings.json` caused two identical `workspace/didChangeConfiguration` notifications to be sent to each language server, e.g.: // Send: {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"jetls":{"code_lens":{"references":true},"completion":{"method_signature":{"prepend_inference_result":true}},"full_analysis":{"debounce":2},"inlay_hint":{"block_end":{"min_lines":25}}}}}} // Send: {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"jetls":{"code_lens":{"references":true},"completion":{"method_signature":{"prepend_inference_result":true}},"full_analysis":{"debounce":2},"inlay_hint":{"block_end":{"min_lines":25}}}}}} `maintain_workspace_config` observed `SettingsStore` directly while `on_settings_changed` also fed the same loop through `request_workspace_config_refresh`, so every settings change drove the refresh loop twice and sent two identical `workspace/didChangeConfiguration` notifications to each language server. Drop the in-loop observer and drive the loop from `external_refresh_requests` alone. Settings changes still arrive via `on_settings_changed -> request_workspace_config_refresh`, and toolchain activation continues to use the same channel. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - Fixed language servers receiving duplicate `workspace/didChangeConfiguration` notifications on every settings change.
This was referenced Jun 10, 2026
This was referenced Jun 18, 2026
Closed
This was referenced Jul 1, 2026
This was referenced Jul 10, 2026
jonx
pushed a commit
to jonx/zed-aros
that referenced
this pull request
Jul 17, 2026
…d-industries#56853) Editing the `lsp` section of `.zed/settings.json` caused two identical `workspace/didChangeConfiguration` notifications to be sent to each language server, e.g.: // Send: {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"jetls":{"code_lens":{"references":true},"completion":{"method_signature":{"prepend_inference_result":true}},"full_analysis":{"debounce":2},"inlay_hint":{"block_end":{"min_lines":25}}}}}} // Send: {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"jetls":{"code_lens":{"references":true},"completion":{"method_signature":{"prepend_inference_result":true}},"full_analysis":{"debounce":2},"inlay_hint":{"block_end":{"min_lines":25}}}}}} `maintain_workspace_config` observed `SettingsStore` directly while `on_settings_changed` also fed the same loop through `request_workspace_config_refresh`, so every settings change drove the refresh loop twice and sent two identical `workspace/didChangeConfiguration` notifications to each language server. Drop the in-loop observer and drive the loop from `external_refresh_requests` alone. Settings changes still arrive via `on_settings_changed -> request_workspace_config_refresh`, and toolchain activation continues to use the same channel. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - Fixed language servers receiving duplicate `workspace/didChangeConfiguration` notifications on every settings change.
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
…d-industries#56853) Editing the `lsp` section of `.zed/settings.json` caused two identical `workspace/didChangeConfiguration` notifications to be sent to each language server, e.g.: // Send: {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"jetls":{"code_lens":{"references":true},"completion":{"method_signature":{"prepend_inference_result":true}},"full_analysis":{"debounce":2},"inlay_hint":{"block_end":{"min_lines":25}}}}}} // Send: {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"jetls":{"code_lens":{"references":true},"completion":{"method_signature":{"prepend_inference_result":true}},"full_analysis":{"debounce":2},"inlay_hint":{"block_end":{"min_lines":25}}}}}} `maintain_workspace_config` observed `SettingsStore` directly while `on_settings_changed` also fed the same loop through `request_workspace_config_refresh`, so every settings change drove the refresh loop twice and sent two identical `workspace/didChangeConfiguration` notifications to each language server. Drop the in-loop observer and drive the loop from `external_refresh_requests` alone. Settings changes still arrive via `on_settings_changed -> request_workspace_config_refresh`, and toolchain activation continues to use the same channel. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - Fixed language servers receiving duplicate `workspace/didChangeConfiguration` notifications on every settings change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Editing the
lspsection of.zed/settings.jsoncaused two identicalworkspace/didChangeConfigurationnotifications to be sent to each language server, e.g.:maintain_workspace_configobservedSettingsStoredirectly whileon_settings_changedalso fed the same loop throughrequest_workspace_config_refresh, so every settings change drove the refresh loop twice and sent two identicalworkspace/didChangeConfigurationnotifications to each language server.Drop the in-loop observer and drive the loop from
external_refresh_requestsalone. Settings changes still arrive viaon_settings_changed -> request_workspace_config_refresh, and toolchain activation continues to use the same channel.Self-Review Checklist:
Closes #ISSUE
Release Notes:
workspace/didChangeConfigurationnotifications on every settings change.