The ACP registry now optionally publishes `linux-{arch}-musl` targets.
On a musl host (e.g. Alpine), Zed now picks that target and falls back
to `linux-{arch}` when an agent doesn't publish one.
The host libc is detected at runtime rather than with `cfg!(target_env =
"musl")`: the Linux remote server is a static musl binary that mostly
runs on glibc hosts, and the desktop build is glibc.
- Move the libc probe from the rust-analyzer adapter into
`util::libc_type::host_libc_type()` and cache the result for the process
lifetime.
- Also read `ldd --version` stderr, which is where musl prints its
version. Previously musl hosts were only detected through the `/lib`
scan.
- Use one ordered list of registry platform keys for both the "supported
on this platform" check and the archive selection, so the registry UI
and the installer agree.
Closes#66850
Release Notes:
- Improved ACP registry agent installation on musl-based Linux systems
to use musl builds when available
## Summary
Arguments of `preproc_call` nodes, like the `pack(push, 4)` in `#pragma
pack(push, 4)` or the `FOO` in `#undef FOO`, had no highlight capture,
so they always rendered as plain text. `#define` bodies are covered by
the injection, and `#if` conditions are parsed as expressions, but
nothing reached `preproc_call`'s `preproc_arg`.
I added a `(preproc_call argument: (preproc_arg) @preproc)` rule to both
the C and C++ highlight queries. I went with `@preproc` because every
built-in theme already defines it, and it makes the whole directive line
one color, like VS Code does. Happy to switch to `@constant.macro` or
`@string` if you'd prefer.
| Before | After |
| --- | --- |
| <img alt="preproc-before"
src="https://github.com/user-attachments/assets/95fa0660-c41f-4433-98c7-887d9871fe1d"
/> | <img alt="preproc-after"
src="https://github.com/user-attachments/assets/7c4fa978-a6c1-4707-a627-6d7e32dd897a"
/> |
| <img alt="preproc-before-light"
src="https://github.com/user-attachments/assets/3d2479ce-cd04-42ae-bfeb-e5c8c49fb9a6"
/> | <img alt="preproc-after-light"
src="https://github.com/user-attachments/assets/8d342f73-25e2-4dae-b984-72b88fd23287"
/> |
`#define FOO 1` and `#if defined(BAR)` look the same before and after.
Closes#66675
## Testing
- Added a query test for C and one for C++, checking that `#pragma` and
`#undef` arguments are captured as `preproc` and that a `#define` body
isn't. Both fail without the query change.
- `cargo test -p languages` passes (105 tests), and `./script/clippy -p
languages` is clean.
- Built the branch on macOS and compared it with Zed 1.28.1 on the same
file, in One Dark and One Light (screenshots above).
To try it: open a `.c` or `.cpp` file and type `#pragma pack(push, 4)` /
`#undef FOO`. The arguments should now take the directive's color.
I used Claude Code to help with this change and tested it myself.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Improved syntax highlighting of `#pragma` and `#undef` arguments in C
and C++.
---------
Co-authored-by: imryanthedev <352313849+imryanthedev@users.noreply.github.com>
## Summary
Closes#66169
Fixed missing syntax highlighting for C++ lambda specifiers and the
defined preprocessor operator.
- Added lambda_specifier to the C++ keyword captures so mutable and
static lambda specifiers are highlighted correctly
- Highlighted defined as a preprocessor keyword
- Highlighted the identifier inside defined(...) as a macro constant
- Add a regression test to verify that all four tokens receive the
expected captures.
## Testing
- cargo test -p languages: 109 passed, 0 failed
- cargo test -p languages
test_cpp_highlights_query_captures_lambda_and_defined_keywords: passed
- cargo fmt --all -- --check: passed.
Manually tested on Windows using a locally built Zed instance:
<img width="512" height="471" alt="zed_test"
src="https://github.com/user-attachments/assets/f4ae3b5b-5e3e-4eb9-9d96-caf8923a37a0"
/>
## Self-review
- [X] I've reviewed my diff for quality, security, reliability, and
performance.
- [X] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [X] Tests cover the new or changed behavior.
Release Notes:
- Fixed missing syntax highlighting for C++ lambda specifiers and the
defined preprocessor operator
Supersedes https://github.com/zed-industries/zed/pull/62653
## Summary
This PR unifies the download handling we have in the http_client crate,
because we were alternating between the ways we were downloading a lot,
in one case we changed the way of downloading entirely if a hex digest
was present or not.
With this in, we now handle this one way for all kinds of downloads,
removing a lot of duplicated code and unifying the behavior here across
download types.
## Testing
Tested this manually.
## Self-review
- [X] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.
Release Notes:
- Improved reliability of language server and agent downloads by
verifying checksums consistently, rejecting failed HTTP responses, and
improving cleanup of partial downloads.
Fixes#64841. gopls.run_tests left /C:/... causing os error 267. Now
parses with lsp Uri to_file_path + drive-letter normalize.
Release Notes:
- Fixed Go Run Test failing on Windows with directory invalid error.
---------
Co-authored-by: giocld <giocld@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
## Summary
Closes#65513.
For Rust files outside a Cargo project, `cargo metadata` fails and
aborts task context generation. This discards generic variables such as
`$ZED_STEM`, preventing task and debugger configurations from resolving.
Use `has_cargo_manifest` to check for an ancestor `Cargo.toml`,
returning no Cargo target information when none exists. Resolve the
directory before searching so discovery follows the filesystem ancestry
used by Cargo. Keep existing Cargo errors when a manifest is present.
## Testing
Validated on macOS x86_64 with Rust 1.98.1. The targeted tests and
formatting checks were rerun after the helper extraction; the full build
and UI smoke tests were completed before that behavior-preserving
refactor:
- `cargo test -p languages target_info_from_abs_path --lib --locked`:
**3 passed, 0 failed**. Covers standalone files at root and nested
paths, a valid ancestor manifest, and the existing malformed-manifest
error case.
- `cargo fmt --all -- --check` and `git diff --check`: passed.
- `cargo build -p zed --bin zed --features gpui_platform/runtime_shaders
--locked`: passed. Runtime shaders were used with Xcode Command Line
Tools.
- End-to-end task flow in the built Zed app: `Run standalone Rust file`
resolved `./$ZED_STEM.out` to `./main.out`, printed `standalone Rust
task variables work`, and finished successfully.
- End-to-end debugger flow with CodeLLDB 1.12.3: resolved
`$ZED_WORKTREE_ROOT/$ZED_STEM.out` to the fixture's `main.out`, stopped
at the breakpoint on `main.rs:2` in `main::main`, then printed the same
message and exited with code `0` after Continue.
The two UI flows were exercised using desktop automation; screenshots of
task completion, the breakpoint, and debugger output were inspected.
To verify interactively, open a directory without an ancestor
`Cargo.toml`, create `main.rs` that prints a message, and compile it
with `rustc -g main.rs -o main.out`. With `main.rs` active, run a task
with command `./$ZED_STEM.out` and cwd `$ZED_WORKTREE_ROOT`, then launch
a CodeLLDB debug configuration with program
`$ZED_WORKTREE_ROOT/$ZED_STEM.out`, cwd `$ZED_WORKTREE_ROOT`, and
`"sourceLanguages": ["rust"]`. Set a breakpoint at the print statement,
verify it is hit, then continue. Both flows should print the message.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist). (Not
applicable: no visual changes.)
- [x] Tests cover the new or changed behavior.
AI assisted with implementation and validation; the author has
personally reviewed the diff.
Release Notes:
- Fixed task and debugger variables for Rust files outside Cargo
projects.
Follow-up to
https://github.com/zed-industries/zed/pull/65398#pullrequestreview-5471402233
Not implemented from the feedback:
- Returning the cached `Arc` runs from `highlight_text` behind a
newtype: read-only callers now use `highlight_text_resolved(..).runs`
directly, while `CodeLabel` callers still need an owned `Vec`, which
`highlight_text` now collects once.
- Caching the `Rope` itself to avoid the copy on a cache miss: this
needs a new rope-to-rope comparison and roughly doubles the memory each
entry retains, so the cache keeps one `String` copy.
Release Notes:
- N/A
I'm continuing the work of @lolpack's PR
https://github.com/zed-industries/zed/pull/40953. This makes it such
that user no longer needs to install the external pyrefly extension to
use pyrefly. It also auto-downloads Pyrefly binary when there's no
existing installation, which the pyrefly extension currently can't do.
We don't publish Pyrefly release artifacts to github (yet), so the
easiest way to obtain a Pyrefly installation is with PyPI. Given that
the PyLSP adapter is already doing a PyPI-based installation, I've
essentially copy&pasted most of the logic from there into pyrefly
adapter so Pyrefly could work in exactly the same way for now.
There are a lot of code duplications here! My thought was to get the
functionality in first, and I can send followup PRs to extract
duplicated code into common helper functions.
I tested the change in 2 scenarios:
- No `pyrefly` binary is found in `$PATH`
- There's an existing `pyrefly` binary in `$PATH` -- I obtained it with
`uv tool install pyrefly`.
In both scenarios I ran the test by removing the Pyrefly exteranl
plugin, start Zed, open a `.py` file with type errors in it, and verify
that cmd-click (gotodef) works.
Console output for scenario 1:
```
> cargo run
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Finished `dev` profile [unoptimized + debuginfo] target(s) in 31.62s
Running `target/debug/zed`
2025-12-04T20:58:07-08:00 INFO [zed] ========== starting zed version 0.217.0+dev.65f328bd614282c1c370672106a9a279f8f22a3a, sha 65f328b ==========
2025-12-04T20:58:08-08:00 WARN [zed::reliability] Minidump endpoint not set
2025-12-04T20:58:08-08:00 INFO [extension_host] extensions updated. loading 2, reloading 0, unloading 0
2025-12-04T20:58:08-08:00 WARN [audio::audio_settings] Denoise does not work on debug builds, not enabling
2025-12-04T20:58:08-08:00 INFO [workspace] Rendered first frame
2025-12-04T20:58:09-08:00 WARN [audio::audio_settings] Denoise does not work on debug builds, not enabling
2025-12-04T20:58:16-08:00 INFO [lsp] starting language server process. binary path: "/Users/grievejia/Library/Application Support/Zed/languages/ruff/ruff-0.14.8/ruff-aarch64-apple-darwin/ruff", working directory: "/Users/grievejia/scratch/pyre_test", args: ["server"]
2025-12-04T20:58:20-08:00 INFO [lsp] starting language server process. binary path: "/Users/grievejia/Library/Application Support/Zed/languages/pyrefly/pyrefly-venv/bin/pyrefly", working directory: "/Users/grievejia/scratch/pyre_test", args: ["lsp"]
...
```
We could see that the venv installation is successful and the
auto-installed Pyrefly binary is used.
Console output for scenario 2:
```
> cargo run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 29.62s
Running `target/debug/zed`
2025-12-04T21:01:26-08:00 INFO [zed] ========== starting zed version 0.217.0+dev.65f328bd614282c1c370672106a9a279f8f22a3a, sha 65f328b ==========
2025-12-04T21:01:27-08:00 WARN [zed::reliability] Minidump endpoint not set
2025-12-04T21:01:27-08:00 INFO [extension_host] extensions updated. loading 2, reloading 0, unloading 0
2025-12-04T21:01:27-08:00 WARN [audio::audio_settings] Denoise does not work on debug builds, not enabling
2025-12-04T21:01:27-08:00 INFO [workspace] Rendered first frame
2025-12-04T21:01:28-08:00 WARN [audio::audio_settings] Denoise does not work on debug builds, not enabling
2025-12-04T21:01:34-08:00 INFO [language] found user-installed language server for pyrefly. path: "/Users/grievejia/.local/bin/pyrefly", arguments: ["lsp"]
2025-12-04T21:01:34-08:00 INFO [lsp] starting language server process. binary path: "/Users/grievejia/.local/bin/pyrefly", working directory: "/Users/grievejia/scratch/pyre_test", args: ["lsp"]
```
We could see that the correct installed Pyrefly binary was picked up.
Release Notes:
- Added Pyrefly as builtin language server option
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
## Summary
Follow-up to #65139. That one fixed the order for settings keys, but
enum values had the same problem.
In settings.json, typing `"neigh` for `tabs.activate_on_close` shows
`"left_neighbour"` above `"neighbour"`, even when you type the whole
word.
json-language-server doesn't send `filterText` for enum values and keeps
the quotes in the label, so the query gets matched against `"neighbour"`
with the quote. Because of that, `neighbour` doesn't count as a prefix
match and `left_neighbour` wins. Now, when there's no `filterText` and
the label is a JSON string, the unquoted label is used as `filterText`.
| Before | After |
|---|---|
|

|

|
## Testing
Added a unit test, `cargo test -p languages` passes. Also checked
manually by typing `"neigh` as the value of `tabs.activate_on_close` in
settings.json.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed JSON completion ordering for enum values in settings.json.
Add a tree-sitter query matching `package_clause` in Go files with a
`go-package-test` tag, and wire it to the existing `go test` task
template. This surfaces a run button in the gutter next to the `package`
declaration line, allowing users to run all tests in the current
package.
Closes#49494
Release Notes:
- Added package-level test gutter for Go
---------
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
## First commit:
Avoid process enumeration during macOS startup
Read the real UID with getuid() instead of enumerating processes.
Keep the channel offsets, UID wrapping, and handshake unchanged.
Measurements (warm macOS launches):
- Time to presentation: median 525 ms -> 479 ms over 30 paired launches
(release-fast).
## Second commit:
Reduce startup work and redraw before window reveal
Skip redundant settings recomputation, migration formatting, and
colour-scale construction.
Request a redraw of hidden macOS windows before revealing them.
Measurements (warm macOS launches):
- Startup work, time to selected presentation: paired median reductions
of 7.5 ms and 10.7 ms in two runs of 30 pairs.
- Window reveal, time to first captured text: paired median reduction of
18.4 ms over 30 pairs.
Release Notes:
- Slightly improved Zed's startup time in general case
- [GPUI] N/A
Fixes#63165
# Objective
Rust declarative macros briefly show a `macro_rules!` detail in the
completion menu before it disappears.
## Solution
Find the declarative macros using `detail_right` instead of checking
only `completion.detail`. `detail_right` covers both
`label_details.description` and `detail`, so both forms produce the same
completion label.
## Testing
Added tests covering the macro detail in both fields and a test ensuring
import details are preserved.
Also checking the regression is fixed.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Showcase
https://github.com/user-attachments/assets/b7f92ba1-0e7c-473d-9ca2-0e22fc255db9
## Release Notes:
- Fixed `macro_rules!` text flickering in the Rust completion menu.
## Summary
This PR changes the path suffixes to be stored as SharedStrings instead.
With this as well as the toml crate bump here, we can save on some
clones.
Primarily though, this change is pulled out of
https://github.com/zed-industries/zed/pull/65047 where I want to change
the type again, and thus the changes here to `.into()` everything help
me to shrink the diff of the other PR.
Yet, in the meantime, this is a nice benefit to have that does improve
things a bit when cloning and allocating, thus splitting this out into
its own PR
Release Notes:
- N/A
# Objective
Closes#58584. `.env` files are classified as Shell Script, so Zed runs
`bash-language-server` on them and `shellcheck` [reports SC2034 on every
line](https://github.com/zed-industries/zed/issues/58584#issuecomment-4625839715).
## Solution
Add an `Env` language that reuses the Bash grammar and registers no LSP
adapters, so highlighting stays and no language server starts. `.envrc`
remains Shell Script, since direnv executes it as shell.
#7124 mapped `.env` to Shell Script for highlighting and
`redactions.scm`, not for linting. `Env` keeps both and only drops the
language server.
## Testing
- By hand on Windows with `shellcheck` on `PATH`: a `.env` reports 18
SC2034 warnings before and none after.
- Unit test covers the `.env` / `.envrc` / `.sh` classification.
## Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Showcase
<details>
<summary>Click to view showcase</summary>
<img width="811" height="841" alt="Group 1"
src="https://github.com/user-attachments/assets/fe05e884-e915-420d-a0ba-4075fef8a3d3"
/>
</details>
---
Release Notes:
- Fixed `.env` files being treated as shell scripts, which made
`shellcheck` report SC2034 on every line. ".env" files now use a
separate Env language.
## Summary
Closes#64341
Typing `"status` in settings.json puts `show_call_status_icon` above
`status_bar`.
json-language-server includes quotes in `filterText` (`"status_bar"`),
but the search query doesn't. Since #62433, this means a match at the
start of the key gets a lower score than it should.
This strips the quotes in the JSON adapter's `process_completions`,
following the Python adapter. Insertion is unchanged.
Enum values like `"dark"` and `"system_dark"` have the same problem, but
their quotes come from the label. I'll handle those in a separate PR.
Before / after:
| Before | After |
|---|---|
|

|

|
## Testing
Added a unit test. `cargo test -p languages` and `cargo test -p editor`
pass.
Checked on macOS: typing `"status` in settings.json now puts
`status_bar` first. Selecting it inserts the same text as before.
## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.
Release Notes:
- Fixed JSON completion ordering when typing the start of a key.
Part of https://github.com/zed-industries/zed/issues/57349
`MarkdownElement` re-highlights every code block with tree-sitter on
every frame.
Each visible code block pays a full parse per frame, which makes agent
panel streaming and hover popovers janky once the content grows.
This PR computes code block highlights once, in the background parse
task, instead of at render time:
- Highlights are resolved into `(Range<usize>, HighlightId)` runs at
parse time; each entry stores the grammar and `HighlightMap` it was
resolved against and is served only while the grammar still holds the
pointer-identical map (`ResolvedHighlights::is_current`), so theme
changes need no invalidation hooks, and a block whose entry went stale
falls back to direct fragment highlighting at render until the next
parse.
- `Language::highlight_text_resolved` memoizes results in a
content-keyed LRU (4MB budget, 512KB per-entry cap), so the re-parses
triggered by streaming appends reuse the highlights of unchanged blocks
instead of re-running tree-sitter on them.
- Blocks larger than the per-entry cap bypass the cache and are
highlighted directly, as before.
`CostBudgetedLru` is generic rather than specialized because a follow-up
PR reuses it for per-buffer highlight caching in
`BufferSnapshot::chunks`; the capture flattening keyed by grammar index
(`HighlightCaptureRef`) is shared with that follow-up as well.
## Benchmarks
`cargo bench -p benchmarks --bench markdown_renderer` renders generated
documents that mix paragraphs, headings, tables, and Rust code blocks.
**Run 1 — baseline, `main` (`d6449a9e3f`):**
```
Markdown render/min_bytes/5000 time: [1.2956 ms 1.2974 ms 1.3016 ms]
Markdown render/min_bytes/10000 time: [1.7919 ms 1.7955 ms 1.8026 ms]
Markdown render/min_bytes/50000 time: [6.5510 ms 6.6241 ms 6.6671 ms]
Markdown render/min_bytes/250000 time: [37.644 µs 2.4819 ms 4.3791 ms] <- bimodal already on main
```
**Run 2 — this branch:**
```
Markdown render/min_bytes/5000 time: [940.11 µs 945.28 µs 948.79 µs]
change: [-29.317% -28.385% -27.607%] (p = 0.00 < 0.05)
Markdown render/min_bytes/10000 time: [1.1162 ms 1.1331 ms 1.1407 ms]
change: [-40.859% -39.151% -37.719%] (p = 0.00 < 0.05)
Markdown render/min_bytes/50000 time: [2.4943 ms 2.9225 ms 3.1051 ms]
change: [-80.088% -67.885% -58.058%] (p = 0.00 < 0.05)
Markdown render/min_bytes/250000 time: [43.442 µs 44.661 µs 45.514 µs]
change: [-98.210% -95.806% +5.5167%] (p = 0.17 > 0.05)
```
Over the same runs, GPUI reports window draw mean 2.22 ms → 1.26 ms, p99
31.2 ms → 16.0 ms, and the share of frames that blow the frame budget
drops from 3.9% to 2.0%.
Note: at the 250,000-byte case root blocks render lazily, which makes
the measurement bimodal and inconclusive in both configurations.
Release Notes:
- Improved rendering performance of markdown code blocks (agent panel,
hover popovers, markdown preview)
LSP 3.18 allows servers to send [`MarkupContent` diagnostic
messages](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#diagnostic),
guarded by the client capability
`textDocument.diagnostic.markupMessageSupport`.
- Advertise `markup_message_support` only while pull diagnostics are
enabled because `textDocument.diagnostic` is the pull-model capability.
LSP 3.18 currently has no equivalent capability for push diagnostics:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#diagnosticClientCapabilitieshttps://github.com/microsoft/language-server-protocol/issues/2246
- Handle `string | MarkupContent` messages in both push and pull
diagnostic paths: markdown-kind messages populate the existing
`Diagnostic::markdown` field (rendered in hover popovers and the
diagnostics panel), plaintext-kind markup remains plain text, and plain
string messages keep going through the adapter's
`diagnostic_message_to_markdown`.
- Preserve server-provided markup for code actions sent back to the
originating server, avoid forwarding markup diagnostics to other
servers, and render diagnostic metadata without altering the
server-provided markdown.
- Carry the markup kind over RPC via a new optional
`LspDiagnostic.markup_message_kind` proto field so remote/collab
projects round-trip `MarkupContent` messages.
Depends on the lsp-types change that turns `Diagnostic.message` into a
`DiagnosticMessage` enum (`string | MarkupContent`):
https://github.com/zed-industries/lsp-types/pull/15
Once merged, Cargo.toml can point to the upstream commit.
Note that Zed already rendered some plain-string diagnostics as Markdown
through language-specific adapter hooks, including `rust-analyzer`. This
adds protocol-level support for diagnostics explicitly sent as LSP 3.18
`MarkupContent`, while preserving the existing adapter fallbacks.
As a result, this does not introduce a new diagnostics rendering
pipeline.
Server-provided Markdown is routed through the existing
`Diagnostic::markdown` path, with small fixes to handle Markdown-only
updates and block content correctly.
## Showcase
Example from [JETLS.jl](github.com/aviatesk/JETLS.jl) (a Julia language
server):
> Before
<img width="924" height="160" alt="Screenshot 2026-07-15 at 16 05 40"
src="https://github.com/user-attachments/assets/b19fe9e3-50e3-44e4-9b4d-ac8bd438d3d6"
/>
> After
<img width="924" height="160" alt="Screenshot 2026-07-15 at 14 13 05"
src="https://github.com/user-attachments/assets/359c3382-118d-4fa6-aa91-6bd3661d3d28"
/>
---
Release Notes:
- Added support for rendering LSP 3.18 Markdown diagnostic messages from
language servers.
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Allows configuring the Bash LSP.
Tested with the following config:
```json
"bash-language-server": {
"binary": {
"path": "bash-language-server",
"arguments": ["start"]
},
"settings": {
"bashIde": {
"shfmt": {
"binaryNextLine": true,
"caseIndent": true,
"spaceRedirects": true,
"simplifyCode": true
}
}
}
}
```
Config options [defined
here](https://github.com/bash-lsp/bash-language-server/blob/main/server/src/config.ts),
all prefixed with `bashIde`.
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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Added support for configuring the Bash LSP adapter.
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Refactors our query loading to instead have an enum of supported queries
and load the query files themselves in parallel, where possible.
We will use this to warn extension authors when unsupported queries are
present, as we no longer want to ship those as part of the extension.
It also now enforces one file per supported query - only one extension
currently utilizes this feature and was undocumented previously, so I
decided in favor of removing it here, since this will help with
enforcing extensions to just ship query files we actually support in the
future. The extension has also been migrated so that it does not break
with this effort
Side-effect of this change is that we now load both embedded and
external languages up to at least 10%/5% faster, since the files are now
read in parallel as opposed to sequentially one by one.
Release Notes:
- N/A
# Objective
Closes#62624
Recently, Pyright and BasedPyright changed how they retrieve analysis
settings through `workspace/configuration` in microsoft/pyright#11480
and DetachHead/basedpyright#1847, respectively. Older versions requested
the dotted `python.analysis` and `basedpyright.analysis` sections
directly. Recent versions instead request the parent `python` or
`basedpyright` section and read its nested `analysis` object. Because
Zed stores many existing configurations under the dotted top-level keys,
those settings are not included in its responses to the new
parent-section requests and are therefore silently ignored.
Zed's documentation and many users' settings still use configurations
like this:
https://github.com/zed-industries/zed/blob/9bde578ef5afa84920c4300af25f9dee31c96fcf/docs/src/languages/python.md?plain=1#L131-L148
all the configrations in `basedpyright.analysis` won't work now.
## Solution
To maintain compatibility with both old and new servers, we need to
support both configuration formats. This PR introduces
`normalize_pyright_analysis_configuration`, which copies the analysis
settings into both the dotted and nested formats. This ensures that the
settings are available regardless of which format the language server
requests.
The documentation, however, has been updated to use the nested
structure.
## Testing
New unit tests have been added, and the changes have also been built and
tested locally.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
---
Release Notes:
- Fixed some Pyright and BasedPyright settings not being applied
properly.
# Objective
Opening a file laods it twice. `decode_file_text` builds the whole file
as a `String`, and that `String` stays alive alongside the finished rope
while `text::Buffer::new` copies it in. The `Vec` behind it grows by
doubling, so it also commits up to nearly the file's size again in
capacity it never uses.
Partially addresses #27283.
## Solution
Add `decode_file_text_to_rope`, which streams the file in 1 MB blocks
straight into a `Rope`, validating UTF-8 and normalizing line endings as
it goes. The file is never fully held as a `String`.
`LoadedFile::text` becomes a `Rope` carrying the `LineEnding` detected
before normalizing, so `buffer_store` calls `Buffer::new_normalized`.
## Testing
On a 729 MB SQL dump, peak memory fell 25% and CPU fell around 28%.
tested on 5950x, win11.
Release Notes:
- Improved memory use when opening large files, reducing peak memory
during load by roughly the size of the file itself.
# Objective
Fixes#62529.
Prevent Python toolchain discovery from executing Apple's
`/usr/bin/python3` Command Line Tools shim when no active developer
Python exists. Executing that unresolved shim causes macOS to repeatedly
prompt users to install the Command Line Tools, even when Python is
managed through Nix, uv, or pyenv.
## Solution
Update Python Environment Tools (PET) to `bb8e046`, which includes
microsoft/python-environment-tools#506. That upstream change resolves
active Xcode and Command Line Tools Python executables from filesystem
state and skips unresolved macOS system Python shims before generic
process probing.
Adapt Zed to the updated PET API by:
- displaying the newly supported Hatch environment kind
- passing no refresh identifier when running in-process environment
discovery
## Testing
- `cargo check -p languages --locked`
- PET unit tests covering unresolved macOS system Python shims
- The Zed compilation check was run on Linux; the original dialog
reproduction was not manually tested on macOS.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
---
Release Notes:
- Fixed Python toolchain discovery prompting installation of Apple
Command Line Tools when using a separately managed Python installation.
# Objective
Prevent auto-indent from using stale syntax when text changes during a
background parse.
## Solution
Keep auto-indent pending and parsing active until the current parse
completes.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
---
Release Notes:
- Editor: Fixed auto-indent occasionally using stale syntax after rapid
edits.
## Why
JavaScript, TypeScript, and TSX class declarations were captured as
`type.class`, but the same class names in `new` expressions were
captured as the generic `type`. Themes that define a distinct style for
`type.class` therefore rendered declarations and instantiations
inconsistently.
## What
Update the three highlight queries so constructor identifiers in `new`
expressions use `type.class`. Themes without a dedicated `type.class`
style continue to fall back to their existing `type` style.
Add a regression test that loads the real JavaScript, TypeScript, and
TSX grammars with distinct colors for `type` and `type.class`, then
verifies that both the declaration and instantiation receive the
class-specific highlight.
## Testing
- `cargo test -p languages test_class_instantiation_highlighting`
- `cargo test -p languages`
- `cargo fmt --all -- --check`
- `./script/clippy -p languages`
## References
Closes#55943
Release Notes:
- Fixed inconsistent class instantiation highlighting in JavaScript,
TypeScript, and TSX.
This adds a dedicated `AvailableLanguages` struct in preparation for a
more cabable language matching based on a given language config. No
functional changes, just shuffling some code around for this round.
Also made the LanguageMatcher non-cloneable in favor of wrapping it in
an Arc, since cloning is rather expensive for this and having a
reference is sufficient in all cases right now.
Release Notes:
- N/A
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
In lsp_store, user's lsp initialization_options are merged into the
adapter's
defaults using `merge_json_value_into`; this merges by concatenating
arrays,
which can produce duplicate entries.
Adds merge_json_value_into_replacing_arrays, a variant that replaces
arrays instead of merging; uses it for LSP initialization options.
`merge_json_value_into` is kept since some callers intentionally
use array concatenation (extending rust-analyzer's
experimental.commands.commands list).
Closes#54892
Release Notes:
- Fixed duplicated or extra array values in LSP `initialization_options`
when user settings override LSP defaults with an array
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Correct memory values: 8 GiB limit (8192) and tsserver max memory set to
16384 for TypeScript and JavaScript examples.
# Objective
- Standardized memory values.
## Testing
- This commit not be tested.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [X] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable
Release Notes:
- N/A
Closes#60761
Follow-up to #60970, which fixed this for `typescript-language-server`.
`vtsls` had the same problem, we only checked that the workspace tsdk
directory exists, but TypeScript 7 ships it without `tsserver.js`,
causing vtsls to error on startup.
Now we do the same `tsserver.js` check, so vtsls silently falls back to
its bundled TypeScript (see #60951).
Release Notes:
- Fixed vtsls showing a "doesn't point to a valid tsserver install"
error on startup in projects using TypeScript 7. For full TypeScript 7
support, install the `tsgo` extension to use TypeScript's native
language server.
# Objective
Closes#55936
Helps #57288
There is a strange behavior for Python users when using basedpyright or
pyright as the language server. As reported in #55936, when no settings
are configured in `lsp.basedpyright.settings`, the language server
correctly receives toolchain information discovered by Zed:
```json
{
"venvPath": ".",
"venv": ".venv",
"python": {
"pythonPath": "/home/xin/works/test/test_python/.venv/bin/python",
"defaultInterpreterPath": "/home/xin/works/test/test_python/.venv/bin/python"
},
"basedpyright.analysis": {
"typeCheckingMode": "standard"
},
"basedpyright.disableOrganizeImports": true
}
```
However, when the user configures any other settings in
`lsp.basedpyright.settings`, the toolchain information is silently lost.
For example, with the following `settings.json`:
```jsonc
{
"lsp": {
"basedpyright": {
"settings": {
"analysis": {
"diagnosticMode": "workspace",
"typeCheckingMode": "standard",
"inlayHints.callArgumentNames": true,
"inlayHints.variableTypes": true,
},
},
}
}
}
```
The final configuration sent to the language server becomes:
```json
{
"analysis": {
"diagnosticMode": "workspace",
"typeCheckingMode": "standard",
"inlayHints.callArgumentNames": true,
"inlayHints.variableTypes": true
}
}
```
No toolchain information is passed, so the language server ignores the
user's selected Python environment and falls back to whatever virtual
environment it discovers on its own. To make toolchain selection work,
users currently have to manually configure virtual environment settings
themselves (as noted in
https://github.com/zed-industries/zed/issues/57288#issuecomment-4750935341).
This issue was introduced in #48262, which aimed to make the virtual
environment used by basedpyright/pyright configurable. The core logic is
the `should_insert_toolchain` closure, originally designed to check
whether Zed should inject the detected toolchain into the language
server configuration. The intent was: if the user has already configured
a virtual environment in the language server settings, skip the
injection.
https://github.com/zed-industries/zed/blob/2c346f60a76fe3f0367ef924927f50a6efdf5718/crates/languages/src/python.rs#L2115-L2128
However, the original logic was inverted — it injected the toolchain
when the user had no settings at all or when they had configured virtual
environment keys. This meant that when the user had LSP settings but no
virtual environment configuration, toolchain injection was skipped, as
reported in #55936.
## Solution
Change the logic defined in `should_insert_toolchain` closure, instead
of insert toolchain when detected virtual environment settings, now we
insert toolchain when no virtual environment settings is detected.
## Testing
Tested locally. The logic change is simple, should be easy for review.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
---
Release Notes:
- Fixed toolchain selection being ignored when Pyright or Basedpyright
settings are configured without specifying a Python interpreter path
This is necessary to remove some `util` dependencies from crates, as
well as better sharing for our projects. This also includes the WIP
AbsPath abstraction as well as some bug fixes from internal tooling.
Release Notes:
- N/A or Added/Fixed/Improved ...
Closes https://github.com/zed-industries/zed/issues/60618
TypeScript 7 no longer ships `tsserver.js`, which
`typescript-language-server` depends on.
This PR does two things:
1. Pins the `typescript` package Zed auto-installs for
`typescript-language-server` to `^6`. For projects without their own
TypeScript in `node_modules` (which rely on the copy Zed installs), an
existing 7.x install gets downgraded to the latest 6.x, making the
server usable again.
2. Only hands the workspace's TypeScript to the server as a tsdk when it
actually contains `tsserver.js`, falling back to Zed's installed 6.x
otherwise. So if you upgraded your project to TypeScript 7, the language
server won't break. It keeps working against the 6.x TypeScript Zed
ships.
Note that vtsls, the default TypeScript language server, is unaffected
by the TypeScript 7 release. It bundles its own compatible TypeScript.
See #60951 for details. This PR only affects users who have manually
configured `typescript-language-server` as their language server.
Release Notes:
- Fixed `typescript-language-server` breaking after the TypeScript 7
release. For projects that have upgraded to TypeScript 7, install the
`tsgo` extension to use TypeScript's native language server.
Context:
While looking at #60618, I found out the TypeScript 7 upgrade only
breaks the `typescript-language-server` adapter, not the default vtsls
adapter.
After digging in, it turns out the initial vtsls implementation in
#12606 followed the same two-package installation pattern as the
`typescript-language-server` adapter: it installed both
`@vtsls/language-server` and the latest `typescript`. However, vtsls
already bundles a compatible TypeScript version via
`@vtsls/language-service` and uses it whenever a workspace SDK is
unavailable.
I also cross-checked an intermediate vtsls upgrade issue, #18349, where
we used the installed TypeScript version to decide whether both packages
needed updating, so a new vtsls release could go uninstalled when
TypeScript hadn't changed. #20197 fixed that by checking both packages
independently, but kept the unnecessary standalone TypeScript
installation.
Changes:
This PR removes that redundant installation and version tracking from
the vtsls adapter. Zed now tracks only `@vtsls/language-server` and
relies on its declared TypeScript dependency. Workspace TypeScript and
Yarn SDK detection remain unchanged, so vtsls still uses a workspace SDK
when one is available and otherwise falls back to its bundled version.
As for the consequence of this change:
1. New users are not affected since npm installs vtsls's own pinned
TypeScript dependency anyway.
2. For existing users, the previously installed standalone `typescript`
was never resolvable by vtsls (its pinned version gets installed nested
when the versions conflict), so leaving it there is harmless.
To verify the standalone copy was really unused, I nuked the vtsls dir
and ran main (without this fix), which installed both the top-level
`typescript@7.0.2` and vtsls's own pinned `typescript@5.9.3` nested
under `@vtsls/language-service`. Node's module resolution shows vtsls
can only ever see the nested copy as well as the LSP logs from the
running server shows, all lib definition locations point at the nested
copy:
```
"uri": "file:///.../vtsls/node_modules/@vtsls/language-service/node_modules/typescript/lib/lib.es5.d.ts"
```
I also tested this branch with a fresh install TypeScript files work the
same as before.
Release Notes:
- N/A
# Objective
Fixes#60261
Nothing under a `case` gets indented in C or C++, and the next `case`
doesn't come back out. It stays flat until you hit `editor: format`.
## Solution
The indent queries had no rule for case labels. Added the same pair
`cpp/indents.scm` uses for `access_specifier`: open an indent range at
the label, close it at the switch's `}`, outdent on the next label.
The part that got me: `@start` uses the *end* of the node you capture.
Fine for `access_specifier`, which is just `public:`. But a
`case_statement` swallows the statements under it, so capturing the node
starts the range after the last one. Capture the `:` instead. `default:`
is a `case_statement` too, so it comes along free.
Only affects what happens after a label, so existing `case` alignment
doesn't move.
## Testing
`test_c_autoindent_switch_case` and `test_cpp_autoindent_switch_case`
cover a plain case, fall-through labels and `default`. Both fail on
main. The `access_specifier` tests still pass.
Not mine, but worth knowing: `typescript::tests::test_outline` and
`test_generator_function_outline` are flaky on main, failing about half
my full `cargo test -p languages --lib` runs with or without this
change.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fixed statements under a `case` label not being indented in C and C++
([#60261](https://github.com/zed-industries/zed/issues/60261)).
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
This fixes Go outline extraction for methods whose receiver has no name,
such as `func (v2) Method()`. These methods are now included in outline
symbols, which also feed breadcrumbs and sticky
scroll.
Tested with:
- `cargo test -p languages`
- `cargo test -p grammars`
- `./script/clippy -p languages`
- `cargo fmt --check --package languages`
Before:
[before_cut.webm](https://github.com/user-attachments/assets/91eb5cb0-703a-4496-b0dd-5369c4c219fc)
After:
[after_cut.webm](https://github.com/user-attachments/assets/76d13d88-3671-4118-99fc-c073a6e64727)
Release Notes:
- Fixed Go methods with unnamed receivers not appearing in breadcrumbs
and sticky scroll.
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes#57030
When `fullFunctionSignatures` is enabled in `rust-analyzer`, some
completion items returned by the language server have an unexpected
`filterText`. For example:
```jsonc
{
"label": "sync_all(…)",
"labelDetails": {
"detail": "(alias fsync)",
"description": "pub fn sync_all(&self) -> io::Result<()>"
},
"kind": 2,
"sortText": "7ffffffa",
"filterText": "sync_allfsync",
...
}
```
For such completion items, the rust-analyzer adapter falls back to an
outer range passed into the `mk_label` closure to determine the display
range:
https://github.com/zed-industries/zed/blob/c32c037c6b2b582552edc8c6b9bda513412c3bf4/crates/languages/src/rust.rs#L362-L371
For functions or methods, this fallback range is calculated here:
https://github.com/zed-industries/zed/blob/c32c037c6b2b582552edc8c6b9bda513412c3bf4/crates/languages/src/rust.rs#L424-L435
In this example, the `function_signature` is `"pub fn sync_all(&self) ->
io::Result<()>"`, and the regex matches up to `fn sync_all(&self) ->
io::Result<(`. Currently, the range passed to the `mk_label` closure
mistakenly covers `"ub fn sync_all(&self) -> io::Result<"` (causing the
first character 'p' to be truncated, as reported in #57030), whereas we
only want `"sync_all"` itself
This PR introduces two main changes to fix this behavior:
- Adjust the range start: Skip the leading `fn` keyword so that the
range starts exactly at the function or method name.
- Update the regex pattern: The current pattern matches up to the last
`(`, which causes incorrect slicing if the return type contains
parentheses (e.g., `Result<()>`). This is changed to match up to the
first `(`.
Release Notes:
- Fixed some rust completions has `ub fn ` as prefix when
`fullFunctionSignatures` is enabled
# Objective
Consider a simple Python file with the following content, where both a
method and a function are defined:
```python
class TestCase:
def a_test_method(self): # a method
print("This is a method test")
def a_test_function(): # a function
print("This is a function test")
```
Below this, if we type `a_test_func` and trigger language server
completion, we would expect to see `a_test_function` in the completion
list. Similarly, if we have:
```python
test = TestCase()
test.a_testˇ
```
and trigger language server completion, we should see `a_test_method` in
the completion list.
In both cases, we expect the items in the completion list to have the
same color highlighting as they do in the editor buffer, but currently,
they do not. This is because Zed uses the wrong queries to retrieve the
highlight. Taking the `ty` LSP adapter as an example:
https://github.com/zed-industries/zed/blob/d753a31db53e40c47cfb59964102f07c5493eb4f/crates/languages/src/python.rs#L323-L332
the key `"function.method"` and `"function"` are used to look up the
method and function highlight IDs, but these keys do not exist in
`crates/grammars/src/python/highlights.scm`, which defines the syntax
highlighting. The correct keys here should be `"function.method.call"`
and `"function.call"`.
## Solution
- As stated above, change the keys from `"function.method"` and
`"function"` to `"function.method.call"` and `"function.call"`,
respectively.
- Additionally, since we have several built-in language servers for
Python, a minor refactoring has been done to reduce duplicate code and
simplify future changes.
## Testing
- I have tested this change locally; the before and after comparison is
provided below.
## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Showcase
<details>
<summary>Click to view showcase</summary>
| Before | After |
| :---: | :---: |
| <img width="767" height="308" alt="function_before"
src="https://github.com/user-attachments/assets/943852d6-f54e-411d-916f-add7aac57956"
/> | <img width="767" height="308" alt="function_after"
src="https://github.com/user-attachments/assets/3a817229-ce32-4d13-88b8-9e9151869338"
/> |
| <img width="767" height="308" alt="method_before"
src="https://github.com/user-attachments/assets/cbc0f4f4-be6e-44d3-9798-df29df5731a3"
/> | <img width="767" height="308" alt="method_after"
src="https://github.com/user-attachments/assets/6e8f7e84-c5c6-4b37-a2c5-10820f12a09d"
/> |
</details>
---
Release Notes:
- Improved Python completion item highlighting for methods and
functions.
The `go-subtest` task template wrapped the `-run` arg in single quotes
for shell safety. This works for Run Test (terminal strips quotes), but
Debug Test sends the arg through Delve’s DAP protocol with no shell
involved, so the literal quote characters ended up in the regex and
prevented any match.
All other Go task templates (`go-test`, `go-testify-suite`,
`go-table-test-case`) use the backslash-escaped format which `GoLocator`
already knows how to handle. Align the `go-subtest` template to the same
format.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] 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#53230.
Release Notes:
- Fixed Debug Test for Go subtests
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Both cloning and dropping of these has quite a bit of overhead (despite
them being snapshots), so avoid where possible, especially in display
map syncing
Release Notes:
- N/A or Added/Fixed/Improved ...
Closes#46881
Depends on #57276.
Implements `GoRunnableResolver` to post-process table test matches. The
resolver picks the correct string field by comparing against the field
used in `t.Run(tc.<field>, ...)`.
Release Notes:
- Fixed Go table tests not showing run buttons in files with many test
cases.
Resolves https://github.com/zed-industries/zed/issues/58086
This diff fixes `package.json` runnables using npm for projects that
declare their package manager through
`devEngines.packageManager`. The `package.json` parser only looked at
the top-level `packageManager` field, so projects using the newer
`devEngines` shape fell back to `npm` even when they specified `pnpm`,
`yarn`, or `bun`.
With this change, package manager detection also reads
`devEngines.packageManager` in both object and array forms. The
top-level `packageManager` field still takes precedence when both are
present, and the shared parser means the fix applies to `package.json`
gutter runnables as well as TypeScript package-script tasks.
Release Notes:
- Fixed `package.json` runnables ignoring package managers declared via
`devEngines.packageManager`.
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
Stops the `conda activate base` fallback in
`PythonToolchainProvider::activation_script` for two cases:
1. A Conda toolchain whose `environment.name` is `None`.
2. A Conda toolchain whose name is `Some(...)` but `shell.try_quote`
rejects it.
Previously both cases pushed `conda activate base` into the activation
script. With miniforge installed and no env explicitly selected, every
terminal silently activated `(base)`. The user didn't pick `base`;
injecting it is contamination.
Both branches now log a warning and emit no activation line. Users who
want `(base)` can select it as the toolchain explicitly.
Two unit tests cover the new behavior:
`test_conda_activation_skips_when_name_missing` (name=None) and
`test_conda_activation_skips_unquotable_name` (name=Some but unquotable,
exercised with an embedded NUL byte that `shlex::try_quote` rejects).
The existing `test_conda_activation_script_injection` still verifies
that quotable names get activated.
Release Notes:
- Fixed Zed silently injecting `conda activate base` into terminals when
a Conda manager (miniforge/miniconda) was installed but no specific
environment was selected.
rust-analyzer does not really attempt to be backwards compatible, so
when users opt-into the component a toolchain override, we should prefer
that over any other rust-analyzer (especially our own) for better
toolchain compatibility in case people have a more out of date install.
This mirrors the VSCode extension behavior
Release Notes:
- When a worktree contains a Rust toolchain file with a rust analyzer
component specified, Zed will now spawn the given toolchain's
rust-analyzer for toolchain compatability
Zed-managed npm installers were resolving a concrete latest version with
`npm info` and then installing `package@version`. That is brittle when
users
configure npm release-age filtering via `before` or `min-release-age`:
npm's
installer applies those rules during resolution, but our pinned install
target
could disagree with it, and therefore fail to install.
This changes managed npm installs to install `package@latest` and let
npm apply
its own resolver and user config. The local latest-version lookup
remains as a
best-effort cache freshness check, not as the exact install target.
Exact extension API installs remain unchanged because extensions
explicitly
request a package and version. If we want to revisit that we can.
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#53611
Release Notes:
- Fixed npm-backed tool installs to better respect npm release-age
filters.