Skip to content

Prevent auto-restart of language servers after Stop All Servers - #51468

Merged
Veykril merged 2 commits into
mainfrom
veykril/push-xyxqquzzywls
Jun 5, 2026
Merged

Prevent auto-restart of language servers after Stop All Servers#51468
Veykril merged 2 commits into
mainfrom
veykril/push-xyxqquzzywls

Conversation

@Veykril

@Veykril Veykril commented Mar 13, 2026

Copy link
Copy Markdown
Member

Release Notes:

  • When stopping all language servers, Zed will now no longer restart language servers when language files change until the user restarts all language servers explicitly

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Mar 13, 2026
@Veykril
Veykril enabled auto-merge (squash) March 13, 2026 10:13
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Mar 13, 2026
@zed-codeowner-coordinator
zed-codeowner-coordinator Bot requested review from a team, cameron1024 and smitbarmase and removed request for a team March 13, 2026 10:13
@Veykril
Veykril force-pushed the veykril/push-xyxqquzzywls branch from fcf1b55 to ec38089 Compare March 19, 2026 16:54
@Veykril
Veykril disabled auto-merge March 19, 2026 16:54
@SomeoneToIgnore

Copy link
Copy Markdown
Contributor

To note, would be good to have this mechanism extended to stopping single servers too.

@Veykril
Veykril force-pushed the veykril/push-xyxqquzzywls branch from ec38089 to d95628a Compare April 8, 2026 14:46
@zelenenka zelenenka removed the size/S label Apr 9, 2026
When the user clicks Stop All Servers, set a flag that suppresses
automatic language server startup. The flag is cleared when Restart
All Servers is hit. This guards the three auto-start paths:

- Buffer registration with language servers (new buffers, file path
  changes, language detection, language registry reloads)
- Server tree refresh (workspace config / manifest changes)
- Settings-triggered restarts (semantic token mode changes)
@Veykril
Veykril force-pushed the veykril/push-xyxqquzzywls branch 2 times, most recently from 15ef9d0 to 2b39403 Compare June 5, 2026 07:41
Extend the stop-suppresses-restart mechanism to also work when stopping
individual language servers, not just "Stop All Servers".

Replace the single language_servers_stopped boolean with two fields:
- all_language_servers_stopped: set by Stop All Servers
- stopped_language_servers: tracks individually-stopped servers by name

When a user stops a specific language server, its name is recorded in the
stopped set. The three auto-start paths (buffer registration, server tree
refresh, settings-triggered restarts) now skip servers in this set.

Restarting a specific server clears it from the stopped set. Restart All
Servers clears both the global flag and the per-server set.
@Veykril
Veykril force-pushed the veykril/push-xyxqquzzywls branch from 2b39403 to c83720e Compare June 5, 2026 08:11
@Veykril
Veykril added this pull request to the merge queue Jun 5, 2026
Merged via the queue into main with commit e77b18b Jun 5, 2026
32 checks passed
@Veykril
Veykril deleted the veykril/push-xyxqquzzywls branch June 5, 2026 10:38
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 8, 2026
…industries#51468)

Release Notes:

- When stopping all language servers, Zed will now no longer restart
language servers when language files change until the user restarts all
language servers explicitly
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…industries#51468)

Release Notes:

- When stopping all language servers, Zed will now no longer restart
language servers when language files change until the user restarts all
language servers explicitly
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…industries#51468)

Release Notes:

- When stopping all language servers, Zed will now no longer restart
language servers when language files change until the user restarts all
language servers explicitly
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 staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants