Commit graph

849 commits

Author SHA1 Message Date
Lukas Wirth
58051d6e84
languages: Fix symbol label for enum variants (#47210)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-20 12:26:36 +00:00
Finn Evers
2321178f28
languages: Apply JSX fixes to JavaScript highlights (#47130)
Closes #46701

This ports the fixes from #46442 over to the JavaScript highlights,
which we forgot to do in that PR since the highlights are not shareable
and the fix was only applied to TSX... Hence, porting the fixes here
manually to solve the issue for good.

Release Notes:

- Fixed an issue where JSX components were highlighted too broadly,
causing normal HTML tags to be highlighted as such
2026-01-19 09:50:48 +00:00
Finn Evers
e12dadd7da
chore: Remove contexts.scm (#47127)
The file is unused, empty and hasn't been touched in two years, hence
removing this.

Release Notes:

- N/A
2026-01-19 09:29:19 +00:00
Joseph T. Lyons
c0bfba85c5
ty: Add support for using venv-installed binary (#47029)
This aligns ty's behavior with ruff by checking for binaries in the
following order:

1. venv (from the Python toolchain's bin directory)
2. PATH
3. Zed-installed

Release Notes:

- ty: Added support for using venv-installed binary
2026-01-16 22:22:38 +00:00
Kirill Bulatov
deb1b6e46a
Fix json-language-server not considering file_types from project settings (#46991)
Release Notes:

- Fixed json-language-server not considering `file_types` from project
settings
2026-01-16 14:33:28 +00:00
Xin Zhao
e1f73a61fe
languages: Support terminal auto-activation for poetry managed Python environment (#46900)
Although `poetry` may store virtual environments in a global cache
directory (unlike the standard project-local `.venv`), the internal
directory structure of these environments remains consistent with
standard `venv` or `uv` environments.

Since our existing activation logic for `venv` environments relies on
relative paths within the environment root, it is naturally compatible
with `poetry` environments. Once the toolchain locates the environment's
root directory, the activation scripts can be applied without further
modification.

Testing:
- Verified on Windows: Confirmed working across `PowerShell`, `Pwsh`,
and `Cmd` for global poetry environments.
- Observation: When using an in-project `.venv` directory, the toolchain
may categorize the environment as `venv`-managed instead of
`poetry`-managed. While this behavior relates to the toolchain's
discovery logic, the activation itself remains fully functional as the
underlying structure is compatible.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-15 13:59:59 +00:00
Cole McAnelly
c67328ab2e
languages: Separate control flow keywords for Shell Scripts (#46722)
Part of https://github.com/zed-industries/zed/issues/9461. Similar PRs:

- https://github.com/zed-industries/zed/pull/39683
- https://github.com/zed-industries/zed/pull/39801


## Release Notes:

- Added the ability to separately highlight control flow keywords for
Shell Scripts for users and theme authors via the `keyword.control`
syntax property.

## Screenshots

| **Before** | **After** |
|:--:|:--:|
| <img width="719" height="860" alt="image"
src="https://github.com/user-attachments/assets/1e509e7b-a197-4fb0-a5da-bd3669b6bcd6"
/> | <img width="718" height="855" alt="image"
src="https://github.com/user-attachments/assets/9c5e253d-bfd6-4fe7-9e30-95af1b260fdf"
/> |
2026-01-14 16:52:39 +00:00
Lukas Wirth
b1da735395
languages(rust): Highlight enum variant labels (#46772)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-14 08:52:00 +00:00
Yuantian Ding
8a1cf4d499
Add structured outline for Markdown (#45643)
Just make outline of markdown to be structured:

<img width="282" height="144" alt="image"
src="https://github.com/user-attachments/assets/6c7e5d5f-ae09-47a9-965a-6f9f9b731ce6"
/>

Release Notes:

- Added structured outline for Markdown.
- Also fixed the breadcrumb display in Issue
[#45663](https://github.com/zed-industries/zed/issues/45663).
2026-01-12 11:06:11 -05:00
Lukas Wirth
819d2f7c78
project_symbols: Support rust-analyzer path symbol search (#46511)
cc https://github.com/rust-lang/rust-analyzer/pull/21415

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-12 11:41:13 +00:00
Xin Zhao
442c236402
languages: Fix Python venv auto-activation for PowerShell 7 (#46465)
Summary
This PR fixes an issue where Python virtual environments (`venv`, `uv`,
etc.) were not automatically activated when opening a terminal using
PowerShell 7.

Details
`ShellKind` distinguishes between the legacy Windows PowerShell
(`ShellKind::PowerShell`) and the newer PowerShell 7
(`ShellKind::Pwsh`). Previously, the logic in
`resolve_venv_activation_scripts` only checked for
`ShellKind::PowerShell`, causing `activate.ps1` resolution to fail for
`Pwsh` users.
This change adds `ShellKind::Pwsh` to the resolution list, mapping it to
`activate.ps1` just like the legacy PowerShell.

Release Notes:

- Fixed Python virtual environments not automatically activating in
PowerShell 7
2026-01-09 18:48:37 +00:00
Finn Evers
206f54e3d7
languages: Do not highlight JSX/TSX components too broadly (#46442)
Closes #46340

Release Notes:

- Fixed an issue where HTML tags where highlighted as JSX components.
2026-01-09 13:59:54 +01:00
Dylan
ef4c1b34ba
Add '#' to word_characters in JSON/CSS config (#45400) 2026-01-08 21:04:21 +02:00
Kirill Bulatov
f599864294
Fail early if clangd is downloaded on aarch Linux (#46346)
Part of https://github.com/zed-industries/zed/issues/46182

One caveat of this fix is that already downloaded clangd versions will
error with the old, "cannot start binary" error.
The new ones will be getting

<img width="1728" height="1084" alt="image"
src="https://github.com/user-attachments/assets/d2fdafed-6e60-4bc6-9eb2-b785fff65f3a"
/>

though.

Release Notes:

- N/A
2026-01-08 11:05:15 +00:00
Mikayla Maki
97c35c084b
gpui: Actually remove the Result from AsyncApp (#45809)
Depends on: https://github.com/zed-industries/zed/pull/45768

Refactor plan:
https://gist.github.com/mikayla-maki/6c4bf263fd80050715ba01f45478796e
Overall plan:
https://gist.github.com/mikayla-maki/7bb5078e4385a2e683e1e1eb40d17d38

This is the big one.

Release Notes:

- N/A

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 12:48:24 -08:00
Abdelhakim Qbaich
49e4102351
project: Fix organize imports action not working for Python (#45874)
Closes https://github.com/zed-industries/zed/issues/26819

Explained in
https://github.com/zed-industries/zed/issues/26819#issuecomment-3399175027
That action is now the default on format in
https://github.com/zed-industries/zed/pull/41103 since October, but
applying manually is still broken.

Release Notes:

- Fixed an issue where the `editor: organize imports` action didn’t work
for Python, even though imports were organized correctly during
formatting.
2026-01-07 10:00:04 +00:00
ozacod
8df27897e3
languages: Fix C/C++ outline for mixed storage classes and type qualifiers (#46135)
Current tree sitter configuration for the outline was not working
correctly since the rule required a strict order, firstly
storage_class_specifier then type_qualifier. This resulted in a failure
to recognize types such as "constexpr int", "const double", etc. This PR
proposes a solution with diagnostic capture of type and storage
qualifiers which ensures full context capture and works well with C++.


Before:
<img width="924" height="365" alt="before"
src="https://github.com/user-attachments/assets/d4e0baab-b074-42fc-8a45-46c93d1d352b"
/>

After:
<img width="866" height="367" alt="after"
src="https://github.com/user-attachments/assets/0e69a4d8-fd91-44b3-bc7e-0c9e39b23d2e"
/>


Release Notes:

- Fixed outline configuration for C++ variables with complex specifiers.
2026-01-06 19:38:16 +00:00
ozacod
dea9d13709
languages: Support enum class/struct in outline in C++ (#46121)
Before:
<img width="964" height="318" alt="before"
src="https://github.com/user-attachments/assets/946b1997-5e63-4d8c-8468-b6a93e73efa3"
/>

After:
<img width="981" height="335" alt="after"
src="https://github.com/user-attachments/assets/177e1734-518f-4686-bd04-0015f486c421"
/>

Release Notes:

- Fixed missing enum class struct at outline panel for C++
2026-01-06 11:16:38 -08:00
ozacod
658d419afc
languages: Add union field declarations to outline in C++ (#46127)
Before:
<img width="609" height="220" alt="before"
src="https://github.com/user-attachments/assets/2bc10b8c-ecc5-419b-825b-5b7c8440b89b"
/>

After:
<img width="689" height="169" alt="after"
src="https://github.com/user-attachments/assets/ff3de33e-f71c-4fe7-b1ef-df79d935667d"
/>

Release Notes:

- Fixed outline members outline issue of unions for C++
2026-01-06 11:15:57 -08:00
ozacod
c7c0f560b8
languages: Capture escape sequences in C and C++ (#46116)
Before:
<img width="901" height="247" alt="before"
src="https://github.com/user-attachments/assets/95467f0a-e464-44ea-a8f3-bedccf57c6a9"
/>

After:
<img width="967" height="256" alt="after"
src="https://github.com/user-attachments/assets/5eb43918-4348-42d2-9174-3fafd82919d0"
/>

Release Notes:

- Added highlighting for escape sequences for C and C++.
2026-01-06 02:12:18 +00:00
Haojian Wu
6625997e0f
languages: Include namespace in the outline for C++ (#45794)
Before: 

<img width="389" height="147" alt="image"
src="https://github.com/user-attachments/assets/5412bde6-2f1b-4bb4-a06f-111724597372"
/>

After:
<img width="404" height="139" alt="image"
src="https://github.com/user-attachments/assets/8f906245-4c6e-4cf0-bb32-1b47048f46c0"
/>


Release Notes:

- Include namespace symbol in the outline view for C++.
2026-01-05 22:13:08 +01:00
Haojian Wu
0e5b6a5f3f
outline: Fix nesting issue for variable declarations (#45797)
Before:

<img width="665" height="116" alt="image"
src="https://github.com/user-attachments/assets/3c0b6ea4-f030-4fef-a0eb-8251ce16a651"
/>

After:

<img width="601" height="104" alt="image"
src="https://github.com/user-attachments/assets/31659c75-6f73-40e7-9d3b-c4ae99357b12"
/>

The fix is similar to https://github.com/zed-industries/zed/pull/36076.

Release Notes:

- Fix outline nesting issue for variable declarations in C++
2026-01-05 22:00:11 +01:00
Finn Evers
beece469d6
language: Remove embeds support (#46076)
Embeddings have neither been used nor maintained in over a year and
there are currently no plans to use these again any time soon. Hence,
remove support for these here to more clearly indicate that these are
actually not used.

Release Notes:

- N/A
2026-01-05 19:38:25 +01:00
Xin Zhao
8813abed00
Enable terminal activation for uv-managed environments (#45949)
Currently, the Python toolchain can identify `uv` and `uv-workspace`
environments (showing the correct labels in the UI), but it fails to
activate them when opening a new terminal. This is because the
activation script resolution and command generation logic were missing
for these environment kinds.

This PR adds `uv` and `uv-workspace` to the standard virtual environment
activation flow. Since `uv` creates environments with a standard `venv`
structure, we can reuse the existing `resolve_venv_activation_scripts`
logic to find and execute the appropriate `activate` scripts for
different shells.

Release Notes:

- Fixed terminal activation for `uv` and `uv-workspace` Python
environments.
2026-01-05 15:30:49 +00:00
teapo
7e8310a429
Add luaurc path suffix to JSONC (#46037)
Closes https://github.com/4teapo/zed-luau/issues/31

Luau `.luaurc` config files contain JSON but that allows comments and
trailing commas, making them a perfect fit for JSONC.

Release Notes:

- N/A
2026-01-05 17:11:00 +02:00
Lukas Wirth
ccce05d25c
language: Fix reparse timeout not actually working (#45347)
We use `block_with_timeout` to give the reparse task a millisecond to
complete, and if it takes longer we put the work off to the background.
The reason for this is that we want tree-sitter based features to feel
snappy.
The reparse task is non-cooperative though, it has no yield points,
giving us no place to actually check for our timeout, meaning we will
always drive it to completion and block for the entire duration.
This kicks out the `block_with_timeout` in favor of using the treesitter
progress callback to handle timeouts instead.

Release Notes:

- Improved responsiveness with very language language files on edits
2026-01-05 14:18:09 +00:00
Gaauwe Rombouts
e7474cebc5
typescript: Use @type instead of @type.builtin in highlights (#46068)
Closes #45251

In https://github.com/zed-industries/zed/pull/44532 the syntax
highlighting of JS/TS was improved, but we only used `type.builtin` for
a specific case. This resulted in less consistent syntax highlighting.
Not all themes have this specific token and we don't use `type.builtin`
in other places either, so while this is a little less specific it is
more consistent.

Release Notes:

- Improved syntax highlighting consistency for builtins in JavaScript
and TypeScript
2026-01-05 12:13:19 +01:00
Gaauwe Rombouts
67fc92db05
language: Add support for Tailwind CSS Mode (#45352)
Closes #44904

Adds the Tailwind CSS LSP as suggested here:
https://github.com/zed-industries/zed/pull/39517#issuecomment-3368206678.
This allows users to use the Tailwind CSS LSP for CSS files, to support
Tailwind specific rules.

Docs will be added in a separate PR after this is released

Release Notes:

- Add Tailwind CSS Mode support, for Tailwind specific CSS rules like
`@apply`, `@layer`, and `@theme`.
2026-01-05 11:40:54 +01:00
Patrick Kilgore
64b05028ac
languages: Escape test names for bun runner (#45749)
Closes #45746

Release Notes:

- Fixed un-escaped regexp characters in test names passed to `bun test`
2026-01-04 10:47:32 +01:00
Arhan Chaudhary
e1a09e290c
rust: Fix rshtml injection inside Leptos view! macros (#45952)
Fix the Rust tree-sitter language injection to syntax highlight HTML in
Leptos `view!` macros.

A [cleanup
commit](00278f43bb (diff-15e953fedef2880e09d9e57c8bddf9af5eb583b141fe7d2069c8e579378f4fccL6))
erroneously removed the `(#not-any-of? @_macro_name "view" "html")`
filter from a query that injects Rust into macro invocations. This
causes the query to always match with higher precedence over another one
that sets the `view!` macro language to `rstml`. I have verified that my
fix works locally.

On a related note, I am not sure why language injection for the `sql`
macro is there, which is not even exported by
[sqlx](https://docs.rs/sqlx/latest/sqlx/). The commit author
[mentions](https://github.com/zed-industries/zed/pull/41258#issue-3555384722)
that it is for `sqlez`, a Go library, not a Rust crate.

Release Notes:

- Fixed rshtml injection not working inside Leptos `view!` macros.
2026-01-02 12:03:48 +00:00
Finn Evers
872b2b3510
language: Change signature of initialization_options_schema (#45937)
This makes this take the LSP adapter delegate instead of the binary
itself.

Despite us passing `LanguageServerBinaryOptions` with `allow_download:
false`, extensions would still try to download the binary because it was
never implemented for these to respect that. This would cause us to try
to download all langauge servers provided by extensions when opening a
settings file and/or requesting the JSON schema for that.

This PR fixes this by passing the LSP adapter delegate instead, so the
few language servers which actually want to have the binary for
resolving the initialization options can decide on this by themselves.
With that, we no longer download all language servers for the schema
request

Release Notes:

- N/A
2026-01-01 18:20:53 +00:00
flou
6b3412232f
python: Add support for uv run as the shebang line (#45881)
`uv run` can be used to specify a shebang for a Python script.

See:
https://docs.astral.sh/uv/guides/scripts/#using-a-shebang-to-create-an-executable-file

Release Notes:

- Added support for `uv run` in the shebang line to be interpreted as a
Python script
2025-12-31 01:54:05 +01:00
Teoh Han Hui
ca47822667
Associate devcontainer.json with JSONC language (#45593)
Release Notes:

- N/A
2025-12-23 21:23:28 +00:00
Joseph T. Lyons
8980333e23
Add support for automatic Markdown task list continuation when using uppercase X (#45561)
Release Notes:

- Added support for automatic Markdown task list continuation when using
uppercase X
2025-12-23 08:07:48 +00:00
Nereuxofficial
83449293b6
Add autocomplete for initialization_options (#43104)
Closes #18287

Release Notes:

- Added autocomplete for lsp initialization_options

## Description
This MR adds the following code-changes:
- `initialization_options_schema` to the `LspAdapter` to get JSON
Schema's from the language server
- Adds a post-processing step to inject schema request paths into the
settings schema in `SettingsStore::json_schema`
- Adds an implementation for fetching the schema for rust-analyzer which
fetches it from the binary it is provided with
- Similarly for ruff
<img width="857" height="836" alt="image"
src="https://github.com/user-attachments/assets/3cc10883-364f-4f04-b3b9-3c3881f64252"
/>


## Open Questions(Would be nice to get some advice here)
- Binary Fetching:
- I'm pretty sure the binary fetching is suboptimal. The main problem
here was getting access to the delegate but i figured that out
eventually in a way that i _hope_ should be fine.
- The toolchain and binary options can differ from what the user has
configured potentially leading to mismatches in the autocomplete values
returned(these are probably rarely changed though). I could not really
find a way to fetch these in this context so the provided ones are for
now just `default` values.
- For the trait API it is just provided a binary, since i wanted to use
the potentially cached binary from the CachedLspAdapter. Is that fine
our should the arguments be passed to the LspAdapter such that it can
potentially download the LSP?
- As for those LSPs with JSON schema files in their repositories i can
add the files to zed manually e.g. in
languages/language/initialization_options_schema.json, which could cause
mismatches with the actual binary. Is there a preferred approach for Zed
here also with regards to updating them?
2025-12-21 10:29:38 -05:00
Haojian Wu
895213a94d
Support union declarations in C/C++ textobjects.scm (#45308)
Release Notes:

- C/C++: Add `union` declarations to the list of text objects
2025-12-19 17:37:13 -05:00
Raduan A.
a7e07010e5
editor: Add automatic markdown list continuation on newline and indent on tab (#42800)
Closes #5089

Release notes:
- Markdown lists now continue automatically when you press Enter
(unordered, ordered, and task lists). This can be configured with
`extend_list_on_newline` (default: true).
- You can now indent list markers with Tab to quickly create nested
lists. This can be configured with `indent_list_on_tab` (default: true).

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-12-19 21:44:02 +05:30
Angelo Verlain
3104482c6c
languages: Detect .bst files as YAML (#45015)
These files are used by the BuildStream build project:
https://buildstream.build/index.html


Release Notes:

- Added recognition for .bst files as yaml.
2025-12-19 10:34:40 +00:00
Ben Kunkle
435d4c5f24
vim: Make vaf include const for arrow functions in JS/TS/TSX (#45327)
Closes #24264

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-12-18 21:56:47 -05:00
Henry Chu
bb1198e7d6
languages: Allow using locally installed ty for Python (#45193)
Release Notes:

- Allow using locally installed `ty` for Python
2025-12-18 12:54:34 +01:00
Kirill Bulatov
69fe27f45e
Keep tab stop-less snippets in completion list (#45227)
Closes https://github.com/zed-industries/zed/issues/45083

cc @agu-z 

Release Notes:

- Fixed certain rust-analyzer snippets not shown
2025-12-18 11:29:41 +00:00
Gaauwe Rombouts
0c304c0e1b
lsp: Persist vtsls update imports on rename choice (#45105)
Closes #35930

When a TypeScript file is renamed or moved, vtsls can automatically
update the imports in other files. It pops up a message with the option
to always automatically update imports. This choice would previously
only be remembered for the current session and would pop up again after
a restart.

Now we persist that choice to the vtsls LSP settings in Zed, so that it
remembers across editor sessions.

Release Notes:

- When renaming a TypeScript or JavaScript file, the selected option to
automatically update imports will now be remembered across editor
sessions.
2025-12-17 15:19:01 +01:00
tidely
c0b3422941
node_runtime: Use semver::Version to represent package versions (#44342)
Closes #ISSUE

This PR is rather a nice to have change than anything critical, so
review priority should remain low.

Switch to using `semver::Version` for representing node binary and npm
package versions. This is in an effort to root out implicit behavior and
improve type safety when interacting with the `node_runtime` crate by
catching invalid versions where they appear. Currently Zed may
implicitly assume the current version is correct, or always install the
newest version when a invalid version is passed. `semver::Version` also
doesn't require the heap, which is probably more of a fun fact than
anything useful.

`npm_install_packages` still takes versions as a `&str`, because
`latest` can be used to fetch the latest version on npm. This could
likely be made into an enum as well, but would make the PR even larger.

I tested changes with some node based language servers and external
agents, which all worked fine. It would be nice to have some e2e tests
for node. To be safe I'd put it on nightly after a Wednesday release.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-12-17 12:27:06 +01:00
Lukas Wirth
c5b3b06b94
python: Fetch non pre-release versions of ty (#45080)
0.0.2 is not a pre-release artifact unlike the previous one, so our
version fetch ignored it.

Fixes https://github.com/zed-industries/zed/issues/45061

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-12-17 09:04:10 +00:00
Nereuxofficial
da0960bab6
languages: Correctly calculate ranges in label_for_completion (#44925)
Closes #44825

Release Notes:

- Fixed a case where an incorrect match could be generated in
label_for_completion

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2025-12-16 14:51:33 +00:00
Vitaly Slobodin
4096bc55be
languages: Add injections for string and tagged template literals for JS/TS(X) (#44180)
Hi! This pull request adds language injections for string and tagged
template literals for JS/TS(X).
This is similar to what [this
extension](https://marketplace.visualstudio.com/items?itemName=bierner.comment-tagged-templates)
provides for VSCode. This PR is inspired by this tweet
https://x.com/leaverou/status/1996306611208388953?s=46&t=foDQRPR8oIl1buTJ4kZoSQ

I've added injections queries for the following languages: HTML, CSS,
GraphQL and SQL.
This works for:

- String literals: `const cssString = /* css */'button { color: hotpink
!important; }';`
- Template literals: ```const cssString = /* css */`button { color:
hotpink !important; }`;```

All injections support the format with whitespaces inside, i.e. `/* html
*/` and without them `/*html*/`.

## Screenshots

|before|after|
|---------|-----------|
| <img width="1596" height="1476" alt="CleanShot 2025-12-04 at 21 12
00@2x"
src="https://github.com/user-attachments/assets/8e0fb758-41f0-43a8-93e6-ae28f79d7c8f"
/> | <img width="1576" height="1496" alt="CleanShot 2025-12-04 at 21 08
35@2x"
src="https://github.com/user-attachments/assets/b47bb9c1-224e-4a24-8f08-a459f1081449"
/>|

Release Notes:

- Added language injections for string and tagged template literals in
JS/TS(X)
2025-12-15 17:48:54 -05:00
Casper van Elteren
969e9a6707
Fix micromamba not initializing shell (#44646)
Closes #44645

This is a continuation of #40577

Release Notes:
- initializes micromamba based on the shell
2025-12-15 21:04:50 +01:00
Kirill Bulatov
3cc21a01ef
Suppress another logged backtrace (#44896)
Do not log any error when the binary is not found, do not show any
backtrace when logging errors.

<img width="2032" height="1161" alt="bad"
src="https://github.com/user-attachments/assets/3f379c90-e61f-447f-9e46-fed989380164"
/>


Release Notes:

- N/A
2025-12-15 19:05:50 +02:00
Jeff Brennan
c20cbba0eb
python: Add SQL syntax highlighting (#43756)
Release Notes: 

- Added support for SQL syntax highlighting in Python files

## Summary

I am a data engineer who spends a lot of time writing SQL in Python
files using Zed. This PR adds support for SQL syntax highlighting with
common libraries (like pyspark, polars, pandas) and string variables
(prefixed with a `# sql` comment). I referenced
[#37605](https://github.com/zed-industries/zed/pull/37605) for this
implementation to keep the comment prefix consistent.

## Examples
<img width="738" height="990" alt="image"
src="https://github.com/user-attachments/assets/48a859da-c477-490d-be73-ca70d8e47cc9"
/>

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-12-15 17:11:07 +01:00
Freddy Fallon
d52defe35a
Fix vitest test running and debugging for v4 with backwards compatibility (#43241)
## Summary

This PR updates the vitest test runner integration to use the modern
`--no-file-parallelism` flag instead of the deprecated
`--poolOptions.forks.minForks=0` and `--poolOptions.forks.maxForks=1`
flags.

## Changes

- Replaced verbose pool options with `--no-file-parallelism` flag in
both file-level and symbol-level vitest test tasks
- This change works with vitest v4 while maintaining backwards
compatibility with earlier versions (or 3 at least!)

## Testing

- Added test `test_vitest_uses_no_file_parallelism_flag` that verifies:
  - The `--no-file-parallelism` flag is present in generated test tasks
  - The deprecated `poolOptions` flags are not present
- Manually tested with both vitest v4 and older versions to confirm
backwards compatibility
- All existing tests pass

## Impact

This allows Zed users to run and debug vitest tests in projects using
vitest v4 while maintaining support for earlier versions.

Release Notes:

- Fixed vitest test running and debugging for projects using vitest v4

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-12-15 15:55:54 +00:00