zed/crates/project/tests/integration
Shuhei Kadowaki 3d9852ae04
lsp: Fix duplicate workspace/didChangeConfiguration notifications (#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.
2026-05-29 07:31:00 +00:00
..
agent_registry_store.rs acp: Prevent registry loading from hanging indefinitely (#56108) 2026-05-12 08:52:12 +00:00
bookmark_store.rs editor: Introduce Bookmarks (#54174) 2026-04-17 13:54:43 +02:00
color_extractor.rs
context_server_store.rs Implement MCP OAuth client preregistration (#52900) 2026-05-19 17:45:07 +00:00
debugger.rs git: Add create git worktree hook to task system (#51337) 2026-04-01 16:14:48 -04:00
git_store.rs Fix remote worktree path separators (#55486) 2026-05-06 00:06:51 +00:00
image_store.rs
lsp_command.rs
lsp_store.rs Fix bookkeeping error in tracking of language server IDs when dropping single-file worktree (#57298) 2026-05-21 13:21:00 +00:00
manifest_tree.rs
project_search.rs
project_tests.rs lsp: Fix duplicate workspace/didChangeConfiguration notifications (#56853) 2026-05-29 07:31:00 +00:00
search.rs Add vim/emacs modeline support (#49267) 2026-03-25 03:15:51 +00:00
search_history.rs Allow search/replace to span multiple lines (#50783) 2026-03-19 11:10:14 -06:00
signature_help.rs Use SharedString::new_static for string literals (#47865) 2026-01-28 15:12:48 +00:00
task_inventory.rs task: Skip .vscode tasks when .zed/tasks.json exists (#51797) 2026-03-24 15:18:49 +00:00
trusted_worktrees.rs
yarn.rs