lsp: Exclude dynamic settings from LanguageServerSeed identity#47376
lsp: Exclude dynamic settings from LanguageServerSeed identity#47376osiewicz merged 1 commit intozed-industries:mainfrom
Conversation
osiewicz
left a comment
There was a problem hiding this comment.
I wonder if instead of jumping hoops around comparison operators, we could instead create a newtype that would contain settings.binary and settings.initialization_options. I think that'd be less error-prone. What do you think?
I considered this, but the newtype approach would touch 3 files instead of 2, and we'd still need to remember to update the |
051475a to
d5e7da1
Compare
|
Yeah, I feel somewhat strongly about it; for one, you don't need to provide Right now |
d5e7da1 to
766a10e
Compare
|
Makes sense. I've introduced |
|
Friendly ping. This issue is central to the language server UX in Zed (might just to me though?) , so I'd be happy if we could move forward with it. |
osiewicz
left a comment
There was a problem hiding this comment.
Thanks. Let's address your concern on start_language_server in a follow-up PR. Also, the CI does not pass currently.
`LanguageServerSeed` is used as a key to identify language servers. Previously, it included the entire `LspSettings`, which meant that changing `lsp.<server>.settings` (dynamic configuration) would cause the server to restart unnecessarily. Dynamic settings can be updated via LSP's `workspace/didChangeConfiguration` notification without requiring a server restart. Only `binary` and `initialization_options` should be part of the server identity, as changes to these genuinely require restarting the server. This is a follow-up fix to zed-industries#35270 which introduced `LanguageServerSeed` but inadvertently included dynamic settings in the server identity.
766a10e to
eb50972
Compare
|
Thanks. Fixed the formatting issue. |
|
Thank you! |
LanguageServerSeedis used as a key to identify language servers. Previously, it included the entireLspSettings, which meant that changinglsp.<server>.settings(dynamic configuration) would cause the server to restart unnecessarily.Dynamic settings can be updated via LSP's
workspace/didChangeConfigurationnotification without requiring a server restart. Onlybinaryandinitialization_optionsshould be part of the server identity, as changes to these genuinely require restarting the server.This is a follow-up fix to #35270 which introduced
LanguageServerSeedbut inadvertently included dynamic settings in the server identity (although I remember that this dynamic settings reflection stopped working pretty recently, so there might be other commits besides #35270 that changed the behavior ofLanguageServerSeed)Closes #ISSUE
Release Notes:
lsp.<server>.settingsconfiguration. Dynamic settings are now properly updated viaworkspace/didChangeConfigurationwithout requiring a server restart.