Skip to content

lsp: Identify language servers by their configuration#35270

Merged
osiewicz merged 36 commits intomainfrom
identify-language-servers-by-configuration
Aug 18, 2025
Merged

lsp: Identify language servers by their configuration#35270
osiewicz merged 36 commits intomainfrom
identify-language-servers-by-configuration

Conversation

@osiewicz
Copy link
Member

@osiewicz osiewicz commented Jul 29, 2025

  • WIP: reorganize dispositions
  • Introduce a LocalToolchainStore trait and use it for LspAdapter methods

Closes #35782
Closes #27331

Release Notes:

  • Python: Improved propagation of a selected virtual environment into the LSP configuration. This should the make all language-related features such as Go to definition or Find all references more reliable.

osiewicz added 2 commits July 29, 2025 12:37
This trait is a local counterpart to a dyn ToolchainStore (which is async). We don't want to introduce asynchronity at the ServerTree level, hence we want to query the toolchain synchronously (which was already possible with a local toolchain store anyways, just not convenient).
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jul 29, 2025
@osiewicz osiewicz force-pushed the identify-language-servers-by-configuration branch from df722d0 to c8873c7 Compare July 30, 2025 11:00
@osiewicz osiewicz force-pushed the identify-language-servers-by-configuration branch from a1df550 to d3e02bb Compare August 7, 2025 13:10
@osiewicz osiewicz force-pushed the identify-language-servers-by-configuration branch from d1fd6f1 to 24c7fa9 Compare August 12, 2025 09:30
osiewicz and others added 3 commits August 12, 2025 12:20
modified/affected by fs operation

Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
@osiewicz osiewicz marked this pull request as ready for review August 12, 2025 12:26
osiewicz and others added 2 commits August 12, 2025 14:27
Co-authored-by: Lukas Wirth <lukas@zed.dev>
@osiewicz osiewicz merged commit b8a1066 into main Aug 18, 2025
21 checks passed
@osiewicz osiewicz deleted the identify-language-servers-by-configuration branch August 18, 2025 09:43
orual pushed a commit to orual/zed that referenced this pull request Aug 23, 2025
…#35270)

- **WIP: reorganize dispositions**
- **Introduce a LocalToolchainStore trait and use it for LspAdapter
methods**

Closes zed-industries#35782
Closes zed-industries#27331

Release Notes:

- Python: Improved propagation of a selected virtual environment into
the LSP configuration. This should the make all language-related
features such as Go to definition or Find all references more reliable.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
FrGoIs pushed a commit to FrGoIs/zed that referenced this pull request Sep 29, 2025
…#35270)

- **WIP: reorganize dispositions**
- **Introduce a LocalToolchainStore trait and use it for LspAdapter
methods**

Closes zed-industries#35782
Closes zed-industries#27331

Release Notes:

- Python: Improved propagation of a selected virtual environment into
the LSP configuration. This should the make all language-related
features such as Go to definition or Find all references more reliable.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
aviatesk added a commit to aviatesk/zed that referenced this pull request Jan 22, 2026
`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.
aviatesk added a commit to aviatesk/zed that referenced this pull request Jan 22, 2026
`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.
aviatesk added a commit to aviatesk/zed that referenced this pull request Jan 22, 2026
`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.
aviatesk added a commit to aviatesk/zed that referenced this pull request Jan 26, 2026
`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.
osiewicz pushed a commit that referenced this pull request Jan 28, 2026
`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 #35270 which introduced `LanguageServerSeed`
but 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 of `LanguageServerSeed`)

Closes #ISSUE

Release Notes:

- Fixed language servers unnecessarily restarting when changing
`lsp.<server>.settings` configuration. Dynamic settings are now properly
updated via `workspace/didChangeConfiguration` without requiring a
server restart.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: project not recognizing packages installed in the .venv specified by pyproject.toml python .venvs not recognized in nested directories

1 participant