Commit graph

644 commits

Author SHA1 Message Date
Marshall Bowers
2dc4f156b3
Revert "Capture shorthand_field_initializer and modules in Rust highlights (#35842)" (#36880)
This PR reverts https://github.com/zed-industries/zed/pull/35842, as it
broke the syntax highlighting for `crate`:

### Before Revert

<img width="367" height="70" alt="Screenshot 2025-08-25 at 11 29 50 AM"
src="https://github.com/user-attachments/assets/ce9b8b59-4e89-43ed-84c7-95c0156b9168"
/>

### After Revert

<img width="353" height="69" alt="Screenshot 2025-08-25 at 11 32 17 AM"
src="https://github.com/user-attachments/assets/b6df5a21-64db-4abf-aa76-f085236da0c4"
/>

This reverts commit 896a35f7be.

Release Notes:

- Reverted https://github.com/zed-industries/zed/pull/35842.
2025-08-25 15:51:31 +00:00
Zach Riegel
fda5111dc0
Add CSS language injections for calls to styled (#33966)
…emotion).

Closes: https://github.com/zed-industries/zed/issues/17026

Release Notes:

- Added CSS language injection support for styled-components and emotion
in JavaScript, TypeScript, and TSX files.
2025-08-25 11:30:09 -04:00
versecafe
de5f87e8f2
languages: Add module to TS/JS keywords (#36830)
<img width="376" height="166" alt="image"
src="https://github.com/user-attachments/assets/ae32d74c-387b-4809-a0d6-cfa97888347d"
/>


Release Notes:

- Improved syntax highlights for `module` keyword in TS/JS
2025-08-24 09:54:47 +03:00
Kirill Bulatov
70575d1115
Remove redundant Cargo diagnostics settings (#36795)
Removes `diagnostics.cargo.fetch_cargo_diagnostics` settings as those
are not needed for the flycheck diagnostics to run.
This setting disabled `checkOnSave` in rust-analyzer and allowed to
update diagnostics via flycheck in the project diagnostics editor with
the "refresh" button.

Instead, `"checkOnSave": false,` can be set manually as
https://zed.dev/docs/languages/rust#more-server-configuration example
shows and flycheck commands can be called manually from anywhere,
including the diagnostics panel, to refresh the diagnostics.

Release Notes:

- Removed redundant `diagnostics.cargo.fetch_cargo_diagnostics` settings
2025-08-23 07:03:36 +00:00
Jonathan Andersson
896a35f7be
Capture shorthand_field_initializer and modules in Rust highlights (#35842)
Currently shorthand field initializers are not captured the same way as
the full initializers, leading to awkward and mismatching highlighting.
This PR addresses this fact, in addition to capturing new highlights:
- Tags the `!` as part of a macro invocation.
- Tags the identifier part of a lifetime as `@lifetime`.
- Tag module definitions as a new capture group, `@module`.
- Shorthand initializers are now properly tagged as `@property`.

Here's what the current version of Zed looks like:

<img width="596" height="683" alt="image"
src="https://github.com/user-attachments/assets/c9e52d8e-03dc-426b-8545-4fe872b803e0"
/>

With the new highlighting applied:

<img width="596" height="683" alt="image"
src="https://github.com/user-attachments/assets/b7bd9391-9910-456b-8198-6871174d0f4f"
/>

Release Notes:

- Improved highlighting of Rust files, including new highlight groups
for modules and shorthand initializers.
2025-08-22 20:16:43 +00:00
tidely
7bdc99abc1
Fix clippy::redundant_clone lint violations (#36558)
This removes around 900 unnecessary clones, ranging from cloning a few
ints all the way to large data structures and images.

A lot of these were fixed using `cargo clippy --fix --workspace
--all-targets`, however it often breaks other lints and needs to be run
again. This was then followed up with some manual fixing.

I understand this is a large diff, but all the changes are pretty
trivial. Rust is doing some heavy lifting here for us. Once I get it up
to speed with main, I'd appreciate this getting merged rather sooner
than later.

Release Notes:

- N/A
2025-08-20 12:20:13 +02:00
Finn Evers
83d361ba69
Add more string and comment overrides (#36566)
Follow-up to #36469

Part of the issue was that we hadn't defined comment and string
overrides for some languages. Hence, even after the fix edit predictions
would show up in comments for me in e.g. JSONC files.

This PR adds some more overrides where possible for this repo to ensure
this happens less frequently.

Release Notes:

- N/A
2025-08-20 09:29:53 +00:00
Piotr Osiewicz
6825715503
Another batch of lint fixes (#36521)
- **Enable a bunch of extra lints**
- **First batch of fixes**
- **More fixes**

Release Notes:

- N/A
2025-08-19 20:33:44 +00:00
Piotr Osiewicz
05fc0c432c
Fix a bunch of other low-hanging style lints (#36498)
- **Fix a bunch of low hanging style lints like unnecessary-return**
- **Fix single worktree violation**
- **And the rest**

Release Notes:

- N/A
2025-08-19 21:26:17 +02:00
Piotr Osiewicz
8f567383e4
Auto-fix clippy::collapsible_if violations (#36428)
Release Notes:

- N/A
2025-08-19 13:27:24 +00:00
0x5457
176c445817
Avoid symlink conflicts when re-extracting eslint-xx.tar.gz (#36068)
Closes #34325

**Background**
When upgrading/reinstalling the ESLint language server, extracting the
archive over an existing version directory that contains symlinks can
fail and interrupt the installation.
```
failed to unpack .../vscode-eslint-2.4.4/.../client/src/shared
File exists (os error 17) when symlinking ../../$shared/ to .../client/src/shared
```

**Root cause**
Extracting into a non-empty directory conflicts with leftover
files/symlinks (e.g., `client/src/shared -> ../../$shared`), causing
“File exists (os error 17)”.

When `fs::metadata(&server_path).await.is_err()` is true, the code falls
back to cached_server_binary, but that still targets the same
(potentially corrupted/half-installed) directory and does not run `npm
install` or `npm run compile`, so the system cannot recover and remains
broken.

**Change**
Before downloading and extracting, delete the target version directory
(vscode-eslint-<version>) to ensure an empty extraction destination and
avoid conflicts.

**Alternative approaches**
temp directory + rename: extract into a clean temp directory and rename
into place to avoid half-installed states

[async-tar](https://github.com/dignifiedquire/async-tar) enhancement:
tolerate already-existing symlinks (or add a “replace-existing” option).

Release Notes:

- Fixed eslint installation not clearing files after previous attempts'
2025-08-19 10:28:24 +03:00
Piotr Osiewicz
9e0e233319
Fix clippy::needless_borrow lint violations (#36444)
Release Notes:

- N/A
2025-08-18 21:54:35 +00:00
Piotr Osiewicz
5225844c9e
lsp: Always report innermost workspace_folders (#36407)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-08-18 11:48:21 +00:00
Piotr Osiewicz
b8a106632f
lsp: Identify language servers by their configuration (#35270)
- **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.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-08-18 11:43:52 +02:00
smit
2acfa5e948
copilot: Fix Copilot fails to sign in on newer versions (#36195)
Follow-up for #36093 and
https://github.com/zed-industries/zed/pull/36138

Since v1.355.0, `@github/copilot-language-server` has stopped responding
to `CheckStatus` requests if a `DidChangeConfiguration` notification
hasn’t been sent beforehand. This causes `CheckStatus` to remain in an
await state until it times out, leaving the connection stuck for a long
period before finally throwing a timeout error.

```rs
let status = server
    .request::<request::CheckStatus>(request::CheckStatusParams {
        local_checks_only: false,
    })
    .await
    .into_response() // bails here with ConnectionResult::Timeout
    .context("copilot: check status")?;
````

This PR fixes the issue by sending the `DidChangeConfiguration`
notification before making the `CheckStatus` request. It’s just an
ordering change i.e. no other LSP actions occur between these two calls.
Previously, we only updated our internal connection status and UI in
between.

Release Notes:

- Fixed an issue where GitHub Copilot could get stuck and fail to sign
in.
2025-08-14 23:28:15 +05:30
smit
4a35498829
copilot: Fix Copilot fails to sign in (#36138)
Closes #36093

Pin copilot version to 1.354 for now until further investigation.

Release Notes:

- Fixes issue where Copilot failed to sign in.

Co-authored-by: MrSubidubi <dev@bahn.sh>
2025-08-14 00:19:37 +05:30
Michael Sloan
b564b1d5d0
outline: Fix nesting in multi-name declarations in Go and C++ (#36076)
An alternative might be to adjust the logic to not nest items when their
ranges are the same, but then clicking them doesn't work properly /
moving the cursor does not change which is selected. This could probably
be made to work with some extra logic there, but it seems overkill.

The downside of fixing it at the query level is that other parts of the
declaration are not inside the item range. This seems to be fine for
single line declarations - the nearest outline item is highlighted.
However, if a part of the declaration is not included in an item range
and is on its own line, then no outline item is highlighted.

Release Notes:

- Outline Panel: Fixed nesting of var and field declarations with
multiple identifiers in Go and C++

C++ before:

<img width="743" height="227" alt="image"
src="https://github.com/user-attachments/assets/af1a1d76-ecdc-4999-ae9c-95591726ccca"
/>

C++ after:

<img width="795" height="250" alt="image"
src="https://github.com/user-attachments/assets/49667ed3-e088-48b3-a9f0-6a119b5e7648"
/>

Go before:

<img width="859" height="306" alt="image"
src="https://github.com/user-attachments/assets/ecc7530a-ca16-4f37-b8d1-60687f178b12"
/>

Go after:

<img width="900" height="334" alt="image"
src="https://github.com/user-attachments/assets/d741cfb0-59e5-4d27-bd6a-f422204dc972"
/>
2025-08-12 21:08:19 +00:00
Max Brunsfeld
bfbb18476f
Fix management of rust-analyzer binaries on windows (#36056)
Closes https://github.com/zed-industries/zed/issues/34472


* Avoid removing the just-downloaded exe
* Invoke exe within nested version directory

Release Notes:

- Fix issue where Rust-analyzer was not installed correctly on windows

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-08-12 17:26:56 +00:00
Lukas Spiss
b61b71405d
go: Add support for running sub-tests in table tests (#35657)
One killer feature for the Go runner is to execute individual subtests
within a table-test easily. Goland has had this feature forever, while
in VSCode this has been notably missing.


https://github.com/user-attachments/assets/363417a2-d1b1-43ca-8377-08ce062d6104


Release Notes:

- Added support to run Go table-test subtests.
2025-08-12 11:56:33 +03:00
Lukas Wirth
a88c533ffc
language: Fix rust-analyzer removing itself on download (#35971)
Release Notes:

- N/A\
2025-08-11 12:24:53 +00:00
Lukas Wirth
8d332da4c5
languages: Don't remove old artifacts on download failure (#35967)
Release Notes:

- N/A
2025-08-11 07:20:03 +00:00
jingyuexing
72761797a2
Fix SHA-256 verification mismatch when downloading language servers (#35953)
Closes #35642 

Release Notes:

- Fixed: when the expected digest included a "sha256:" prefix while the
computed
digest has no prefix.
2025-08-10 21:40:14 +02:00
Lukas Wirth
d5c4e4b7b2
languages: Fix digest check on downloaded artifact for clangd (#35870)
Closes 35864

Release Notes:

- N/A
2025-08-08 13:54:26 +00:00
Lukas Wirth
0097d89672
language: Fix rust completion labels with fullFunctionSignature config (#35823)
Release Notes:

- N/A
2025-08-08 07:43:49 +00:00
Dan Wood
0dd480d475
Add spread operator to the @operator list for ECMAScript languages (#35360)
Previously, this was the one thing that could not be styled properly in
ecmascript languages in the zed config, because it was not able to be
targeted.

Now, it is added alongside other operators. This has been tested and
works as expected.

Release Notes:

- N/A
2025-08-08 01:58:26 +00:00
Phoenix Himself
34fc2fd9d0
Treat Arduino files as C++ (#35467)
Closes https://github.com/zed-industries/zed/discussions/35466

Release Notes:

- N/A
2025-08-08 01:54:42 +00:00
Lukas Wirth
4dbd24d75f
Reduce amount of allocations in RustLsp label handling (#35786)
There can be a lot of completions after all


Release Notes:

- N/A
2025-08-07 13:24:29 +00:00
Lukas Wirth
f5f837d39a
languages: Fix rust completions not having proper detail labels (#35772)
rust-analyzer changed the format here a bit some months ago which
partially broke our nice detailed highlighted completion labels. The
brings that back while also cleaning up the code a bit.

Also fixes a bug where disabling rust-analyzers snippet callable
completions would fully break them.

Release Notes:

- N/A
2025-08-07 10:38:58 +00:00
Peter Tripp
a5dd8d0052
Recognize pixi.lock as YAML (#35747)
Release Notes:

- N/A
2025-08-06 15:56:11 -04:00
Lukas Wirth
0302f6356e
Ignore metadata file in RustLspAdapter::get_cached_server_binary (#35708)
Follows https://github.com/zed-industries/zed/pull/35642

Release Notes:

- Fixed accidentally picking a non executable as a rust-analyzer server
when downloading fails
2025-08-06 09:08:32 +00:00
Lukas Wirth
c59c436a11
Verify downloaded rust-analyzer and clang binaries by checking the artifact digest (#35642)
Release Notes:

- Added GitHub artifact digest verification for rust-analyzer and clangd
binary downloads, skipping downloads if cached binary digest is up to
date
- Added verification that cached rust-analyzer and clangd binaries are
executable, if not they are redownloaded

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-08-06 08:32:25 +00:00
tidely
c595ed19d6
languages: Remove a eager conversion from LanguageName to String (#35667)
This PR changes the signature of `language_names` from

```rust
pub fn language_names(&self) -> Vec<String>
// Into
pub fn language_names(&self) -> Vec<LanguageName>
```

The function previously eagerly converted `LanguageName`'s to
`String`'s, which requires the reallocation of all of the elements. The
functions get called in many places in the code base, but only one of
which actually requires the conversion to a `String`. In one case it
would do a `SharedString` -> `String` -> `SharedString` conversion,
which is now totally bypassed.

Release Notes:

- N/A
2025-08-05 23:46:57 +03:00
Smit Barmase
cf23f93917
language: Fix no diagnostics are shown for CSS (#35663)
Closes #30499

`vscode-css-language-server` throws a null reference error if no
workspace configuration is provided from the client.

Release Notes:

- Fixed issue where no diagnostics were shown for CSS, LESS, and SCSS.
2025-08-06 01:58:23 +05:30
Kirill Bulatov
5ca5d90234
Use a better type for language IDs field (#35566)
Part of the preparation for proto capabilities.

Release Notes:

- N/A
2025-08-04 07:12:02 +00:00
Mikayla Maki
2db19e19a5
Improve the yaml outline to show the key value if it's a simple string (#35562)
Before:

<img width="753" height="890" alt="Screenshot 2025-08-03 at 8 58 16 PM"
src="https://github.com/user-attachments/assets/a3816acd-66b2-4042-8181-fbc15881bd4b"
/>

After:

<img width="648" height="634" alt="Screenshot 2025-08-03 at 8 59 30 PM"
src="https://github.com/user-attachments/assets/0ab35f3e-36d6-42b5-bb5f-09431985878e"
/>

Release Notes:

- Improved the yaml outline to include the key's value if it's a simple
string.
2025-08-04 04:17:56 +00:00
Cole Miller
7878eacc73
python: Use a single workspace folder for basedpyright (#35292)
Treat the new basedpyright adapter the same as pyright was treated in
#35243.

Release Notes:

- N/A
2025-07-29 19:00:41 +00:00
Cole Miller
cfd5b8ff10
python: Uplift basedpyright support into core (#35250)
This PR adds a built-in adapter for the basedpyright language server.

For now, it's behind the `basedpyright` feature flag, and needs to be
requested explicitly like this for staff:

```
  "languages": {
    "Python": {
      "language_servers": ["basedpyright", "!pylsp", "!pyright"]
    }
  }
```

(After uninstalling the basedpyright extension.)

Release Notes:

- N/A
2025-07-29 03:19:31 +00:00
Piotr Osiewicz
e5269212ad
lsp/python: Temporarily report just a singular workspace folder instead of all of the roots (#35243)
Temporarily fixes #29133

Co-authored-by: Cole <cole@zed.dev>

Release Notes:

- python: Zed now reports a slightly different set of workspace folders
for Python projects to work around quirks in handling of multi-lsp
projects with virtual environment. This behavior will be revisited in a
near future.

Co-authored-by: Cole <cole@zed.dev>
2025-07-29 00:10:32 +00:00
Bedis Nbiba
d2ef287791
Add runnable support for Deno.test (#34593)
example of detected code:
```ts
Deno.test("t", () => {
  console.log("Hello, World!");
});

Deno.test(function azaz() {
  console.log("Hello, World!");
});
```

I can't build zed locally so I didn't test this, but I think the code is
straightforward enough, hopefully someone else can verify it

Closes #ISSUE

Release Notes:

- N/A
2025-07-29 01:45:41 +02:00
Robert Fratto
2566acc2e7
go: Support benchmarks named "Benchmark" (#35167)
The regular expression for benchmarks was enforcing using a suffix
(e.g., `BenchmarkFoo`), but `Benchmark` is a valid benchmark name, just
as `Test` is a valid test name, and `Fuzz` is a valid fuzz test name.

Release Notes:

- Add support for running Go benchmarks named "Benchmark"
2025-07-28 10:40:46 +00:00
Smit Barmase
43d0aae617
languages: Fix Bash indentation issues with multi-cursors, newlines, and keyword outdenting (#35116)
Closes #34390

This PR fixes several Bash indentation issues:

- Adding indentation or comment using multi cursors no longer breaks
relative indentation
- Adding newline now places the cursor at the correct indent
- Typing a valid keyword triggers context-aware auto outdent

It also adds tests for all of them.

Release Notes:

- Fixed various issues with handling indentation in Bash.
2025-07-26 04:58:10 +05:30
Piotr Osiewicz
57b463fd0d
typescript: Fix handling of jest/vitest tests with regex characters in name (#35090)
Closes #35065

Release Notes:

- JavaScript/TypeScript tasks: Fixed handling of Vitest/Jest tests with
regex-specific characters in their name.
2025-07-25 12:23:52 +00:00
claytonrcarter
1f4c9b9427
language: Update block_comment and documentation comment (#34861)
As suggested in https://github.com/zed-industries/zed/pull/34418, this
proposes various changes to language configs to make block comments and
doc-block-style comments more similar. In doing so, it introduces some
breaking changes into the extension schema.

This change is needed to support the changes I'm working on in #34418,
to be able to support `rewrap` in block comments like `/* really long
comment ... */`. As is, we can do this in C-style doc-block comments (eg
`/** ... */`) because of the config in `documentation`, but we can't do
this in regular block comments because we lack the info about what the
line prefix and indentation should be.

And while I was here, I did various other clean-ups, many of which feel
nice but are optional.

I would love special attention on the changes to the schema, version and
related changes; I'm totally unfamiliar with that part of Zed.

**Summary of changes**
- break: changes type of `block_comment` to same type as
`documentation_comment` (**this is the important change**)
- break: rename `documentation` to `documentation_comment` (optional,
but improves consistency w/ `line_comments` and `block_comment`)
- break/refactor?: removes some whitespace in the declaration of
`block_comment` delimiters (optional, may break things, need input; some
langs had no spaces, others did)
- refactor: change `tab_size` from `NonZeroU32` to just a `u32` (some
block comments don't seem to need/want indent past the initial
delimiter, so we need this be 0 sometimes)
- refactor: moves the `documentation_comment` declarations to appear
next to `block_comment`, rearranges the order of the fields in the TOML
for `documentation_comment`, rename backing `struct` (all optional)

**Future scope**
I believe that this will also allow us to extend regular block comments
on newline – as we do doc-block comments – but I haven't looked into
this yet. (eg, in JS try pressing enter in both of these: `/* */` and
`/** */`; the latter should extend w/ a `*` prefixed line, while the
former does not.)

Release Notes:

- BREAKING CHANGE: update extension schema version from 1 to 2, change
format of `block_comment` and rename `documentation_comment`

/cc @smitbarmase
2025-07-23 20:38:52 +05:30
Ben Kunkle
7c1040bc93
keymap_ui: Auto complete action arguments (#34785)
Supersedes: #34242

Creates an `ActionArgumentsEditor` that implements the required logic to
have a JSON language server run when editing keybinds so that there is
auto-complete for action arguments.

This is the first time action argument schemas are required by
themselves rather than inlined in the keymap schema. Rather than add all
action schemas to the configuration options we send to the JSON LSP on
startup, this PR implements support for the
`vscode-json-language-server` extension to the LSP whereby the server
will request the client (Zed) to resolve URLs with URI schemes it does
not recognize, in our case `zed://`. This limits the impact on the size
of the configuration options to ~1KB as we send URLs for the language
server to resolve on demand rather than the schema itself. My
understanding is that this is how VSCode handles JSON schemas as well. I
plan to investigate converting the rest of our schema generation logic
to this method in a follow up PR.

Co-Authored-By: Cole <cole@zed.dev>

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-07-20 16:24:17 -04:00
Vitaly Slobodin
0ffd93774c
Fix Tailwind support for HTML/ERB files (#34743)
Closes #27118
Closes #34165

Fix a small issue after we landed
https://github.com/zed-extensions/ruby/pull/113+ where we introduced
`HTML/ERB` and `YAML/ERB` language IDs to improve user experience. Sorry
about that. Thanks!

Release Notes:

- N/A
2025-07-19 11:06:35 -04:00
Lukas Spiss
fd05f17fa7
go: Support raw string subtest names (#34636)
Currently, we're not able to run Go sub-tests that have a raw string
(e.g. we're using multi-line names a lot) via the UI. I added the
changes that are needed, plus a handful of tests to cover the basics.

Quick comparison:

Before:
<img width="901" height="370" alt="before"
src="https://github.com/user-attachments/assets/4e5cadeb-9a0c-49e2-b976-2223e1010f85"
/>



After:
<img width="901" height="505" alt="after"
src="https://github.com/user-attachments/assets/994fc69b-f720-488c-a14b-853a3ca2f53c"
/>


Release Notes:

- Added support for Go subtest runner with raw string names
2025-07-18 13:38:18 +02:00
Arseny Kapoulkine
00097df0d5
Improve C/C++ indentation flow for single statement blocks (#34549)
Before this, indentation did not automatically increase after
if/for/while/do/else statements in C++, and only increased after if/for
in C. This led to Zed using last line logic when inserting lines *after*
the indented statement, as well as not indenting the statement itself,
resulting in irregular indentation during typing.

Just adding indentation (similar to C) creates a new problem: now if a
scope is started with a brace on a new line, that brace is indented.
Thus we need to deindent it.

Using else_clause in the indent guide results in the else statement
being indented forward as well, so we need to deindent that too.

Note: the most significant issue for me is the one where indentation
jumps forward when inserting lines after indented lines. Unfortunately,
it appears that fixing that issue requires all of these other changes. I
would have preferred a simpler fix, but I'm not sure if disabling last
line behavior for C/C++ is appropriate as it probably breaks something
else, like cases where the file is incomplete and the statements can't
be parsed properly.

Editing flow before this change:

[Screencast From 2025-07-16
08-31-36.webm](https://github.com/user-attachments/assets/3dea86c5-47bd-47c2-aee8-b0aa613948e6)

Editing flow after this change:

[Screencast From 2025-07-16
08-35-36.webm](https://github.com/user-attachments/assets/7ef23e60-1ee3-49fd-90f9-d53f909ca674)

(note: the "else" snippet is completely breaking the flow here, but I
think that comes from clangd by default? Unfortunately I haven't found a
way to disable it cleanly but that is a separate problem that happens
right now too.)

Release Notes:

- Improve indentation during typing for C/C++ around if/for/while/do
blocks
2025-07-18 12:24:20 +02:00
Umesh Yadav
b4dc7f8a8a
debugger: Add support for running test methods with function receiver in Go (#34613)
![CleanShot 2025-07-17 at 16 35
10](https://github.com/user-attachments/assets/bad794fb-198e-40a1-958c-6ff30a0a4e53)


Closes #33759

Release Notes:

- debugger: Add support for running test methods with function receiver
in Go

Signed-off-by: Umesh Yadav <git@umesh.dev>
2025-07-17 17:44:40 +02:00
Ben Kunkle
58807f0dd2
keymap_ui: Create language for Zed keybind context (#34558)
Closes #ISSUE

Creates a new language in the languages crate for the DSL used in Zed
keybinding context. Previously, keybind context was highlighted as Rust
in the keymap UI due to the expression syntax of Rust matching that of
the context DSL, however, this had the side effect of highlighting upper
case contexts (e.g. `Editor`) however Rust types would be highlighted
based on the theme. By extracting only the necessary pieces of the Rust
language `highlights.scm`, `brackets.scm`, and `config.toml`, and
continuing to use the Rust grammar, we get a better result across
different themes

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-07-16 17:00:47 +00:00
Brian Donovan
6f9e052edb
languages: Add JS/TS generator functions to outline (#34388)
Functions like `function* iterateElements() {}` would not show up in the
editor's navigation outline. With this change, they do.

| **Before** | **After**
|-|-|
|<img width="453" height="280" alt="Screenshot 2025-07-13 at 4 58 22 PM"
src="https://github.com/user-attachments/assets/822f0774-bda2-4855-a6dd-80ba82fffaf3"
/>|<img width="564" height="373" alt="Screenshot 2025-07-13 at 4 58
55 PM"
src="https://github.com/user-attachments/assets/f4f6b84f-cd26-49b7-923b-724860eb18ad"
/>|

Note that I decided to use Zed's agent assistance features to do this PR
as a sort of test run. I don't normally code with an AI assistant, but
figured it might be good in this case since I'm unfamiliar with the
codebase. I must say I was fairly impressed. All the changes in this PR
were done by Claude Sonnet 4, though I have done a manual review to
ensure the changes look sane and tested the changes by running the
re-built `zed` binary with a toy project.

Closes #21631

Release Notes:

- Fixed JS/TS outlines to show generator functions.
2025-07-14 07:26:17 -05:00