Skip to content

Deep copy all ClientConfig properties when copying it#2861

Merged
rchl merged 3 commits intomainfrom
fix/copy-client-config
Apr 12, 2026
Merged

Deep copy all ClientConfig properties when copying it#2861
rchl merged 3 commits intomainfrom
fix/copy-client-config

Conversation

@rchl
Copy link
Copy Markdown
Member

@rchl rchl commented Apr 11, 2026

Ensure that all properties are deep-copied when "copying" ClientConfig. This ensures that starting new plugin instances always starts with a clean base settings that don't include any modifications that might have been added by the plugin instance.

We have previously had issues like sublimelsp/lsp_utils#120 or https://github.com/sublimelsp/LSP-clangd/blob/feb5696aad122ac6c7de3f3d45feda50824026ea/plugin.py#L189-L191 that were worked around in lsp_utils or LSP-clangd but the proper fix is to ensure that this never happens.

@rchl rchl changed the title Deep copy all ClientConfig properties when recreating it Deep copy all ClientConfig properties when copying it Apr 11, 2026
@rchl rchl merged commit e31ee1e into main Apr 12, 2026
11 of 12 checks passed
@rchl rchl deleted the fix/copy-client-config branch April 12, 2026 14:59
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.

2 participants