Commit log

ffa736e zlog: Implement better scope map (#27408)

Click to expand commit body
Another step towards having `zlog` as the default logging solution in
Zed.
The new ScopeMap replaces the previous HashMap based implementation used
for scope lookups to:

A. Reduce complexity
B. Increase speed at which non-enabled logs can be filtered out
C. Provide more granular control over how scopes are determined to be
enabled/disabled,
   and what caching/other speed increase opportunities are available

Release Notes:

- N/A

Ben Kunkle created

e9e6529 Add copy-path tool (#27371)

Click to expand commit body
<img width="631" alt="Screenshot 2025-03-24 at 11 01 10 AM"
src="https://github.com/user-attachments/assets/7e144619-83d0-4455-8d80-cc7ec6a7b03e"
/>

Release Notes:

- N/A

Richard Feldman created

3205ae3 debugger/lldb: Remove xcrun-based lldb-dap binary lookup (#27405)

Click to expand commit body
Closes #ISSUE
/cc @RemcoSmitsDev 

Release Notes:

- N/A

Piotr Osiewicz created

03102b4 assistant: Allow opening the Prompt Library via the command palette (#27368)

Click to expand commit body
Also took the opportunity to rename the action to something that would
be clearer in the command palette, from `DeployPromptLibrary` to
`OpenPromptLibrary`.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Danilo Leal and Marshall Bowers created

c32dece assistant2: Add tiny design improvements (#27399)

Click to expand commit body
Really small stuff, like adding icons and adjusting colors.

Release Notes:

- N/A

Danilo Leal created

bcfc9e4 debugger: Improve variable list keyboard navigation (#27308)

Click to expand commit body
This PR improves the keyboard navigation for the variable list. 
Before this PR, if you want to open/close nested variables, you had to
use the right/left & up/down arrow keys.
Now you can step through with just only using your left/right arrow
keys, this feels a bit more natural and more similar to how other
editors allow you to navigate through variables.

This PR also fixes the following issues:
- Allow selecting a scope to be the start of your selection
- Allow selecting previous item if the first item is selected

-----


https://github.com/user-attachments/assets/aff0b133-97be-4c09-8ee6-b11495ad5568

Release Notes:

- N/A

Remco Smits created

a52095f copilot: Switch to official `@github/copilot-language-server` (#27401)

Click to expand commit body
This PR updates Copilot to use the official
[`@github/copilot-language-server`](https://github.com/github/copilot-language-server-release).

It's [available on
npm](https://www.npmjs.com/package/@github/copilot-language-server), so
we're installing it from there.

I tested it out locally and it seemed to be working as expected.

Release Notes:

- Updated Copilot to use the official
[`@github/copilot-language-server`](https://github.com/github/copilot-language-server-release).

Marshall Bowers created

be83c5e migrator: Add migration for settings changed prior to migrator-introduction (#27375)

Click to expand commit body
This PR updates two existing settings to use the settings migrator
instead of a manually implemented visitor. Both of these settings were
changed prior to the introduction of automatic migrations and the
visitor ensured that the settings were kept backwards compatible. See
https://github.com/zed-industries/zed/pull/22200 and
https://github.com/zed-industries/zed/pull/22364 respectively.

WIth this change, existing user configurations are updated accordingly
and the corresponding settings can derive `Deserialize` again.

I also added tests for the replacement of settings values, as there was
no test for this behaviour. Additionally, I added a seperate test for
the existing migration of `always_show_close_button`, since that
migration updated both the key and value.

Release Notes:

- N/A

Finn Evers created

46d67a3 Don't assume that the excerpt can be found (#27395)

Click to expand commit body
Release Notes:

- Fix (rare) panic in the project diff view

Conrad Irwin created

10c04af Fix regression in `do_completion` changes (#27396)

Click to expand commit body
Caused by #27313

Release Notes:

- N/A

João Marcos created

920eda0 zed_extension_api: Fork new version of extension API (#27390)

Click to expand commit body
This PR forks a new version of the `zed_extension_api` in preparation
for new changes.

Release Notes:

- N/A

Marshall Bowers created

a469c0e assistant2: Add `move-path` tool to the "Code Writer" profile (#27389)

Click to expand commit body
This PR adds the `move-path` tool to the "Code Writer" profile.

Release Notes:

- N/A

Marshall Bowers created

5d05c4a Remove Lua scripting tool (#27388)

Click to expand commit body
We decided to take this out for now. It doesn't seem necessary, and it
complicates the code a lot. We can always put it back later if desired.

Release Notes:

- N/A

Richard Feldman created

5465198 docs: Improve Haskell documentation (#27372)

Click to expand commit body
Closes: https://github.com/zed-industries/zed/issues/27365

Release Notes:

- N/A

Peter Tripp created

bbc7fcc Fix crash when toggling deleted hunk (#27138)

Click to expand commit body
Release Notes:

- Fix rare crash when toggling deleted hunks.

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>

João Marcos and Max Brunsfeld created

11552cc Git: reload index before reading it (#27386)

Click to expand commit body
This is one of the causes for race conditions, but isn't a specific bug fix by itself.

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>

João Marcos and Max Brunsfeld created

6993699 assistant2: Rework `@mentions` (#26983)

Click to expand commit body
https://github.com/user-attachments/assets/167f753f-2775-4d31-bfef-55565e61e4bc

Release Notes:

- N/A

Bennet Bo Fenner created

4a5f89a Make system prompt be more explicit about root paths (#27383)

Click to expand commit body
## Before

<img width="627" alt="Screenshot 2025-03-24 at 12 55 15 PM"
src="https://github.com/user-attachments/assets/349d7025-e65e-4107-86ae-45eb321003b3"
/>

## After

<img width="627" alt="Screenshot 2025-03-24 at 12 52 04 PM"
src="https://github.com/user-attachments/assets/0e8c061a-11c5-4d60-a694-55575b6c8f5e"
/>

Release Notes:

- N/A

Richard Feldman created

e661a0a python: Enable subroot detection for pylsp and pyright (#27364)

Click to expand commit body
This is not going to fully fix the multi-root story, as we still need to
weave venvs through. Hence, no release note just yet.

Release Notes:

- N/A

Piotr Osiewicz created

57ffd6d Update `windows-rs` (#27379)

Click to expand commit body
Release Notes:

- N/A

张小白 created

350c1e4 Serialize breakpoints when changing the state of a breakpoint (#27373)

Click to expand commit body
This fixes a rare bug where a breakpoint isn't saved in the database
when a user toggles a breakpoint and immediately exits out of zed.

Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <peterosiewicz@gmail.com>

Anthony Eid and Piotr Osiewicz created

a23e293 Upgrade `xkbcommon` to v0.8.0 (#27376)

Click to expand commit body
Switch back to xkbcommon releases after
https://github.com/rust-x-bindings/xkbcommon-rs/pull/54 got merged in
0.8.0

Release Notes:

- N/A

tidely created

f2be201 jsx_tag_auto_close: Fix `<Foo.Bar>` component auto-close (#27374)

Click to expand commit body
- **support alternate tag name node names to fix autoclosing of
`<Foo.Bar>` style tags in TSX**
- **remove checks against close tag name while checking if tag is
closed**
- **move jsx tag auto close tests into jsx_tag_auto_close.rs**

Closes #27335

Release Notes:

- Fixed an issue with JSX tag auto-close where components containing a
`.` access like `<Foo.Bar>` would be auto-closed as `</>` instead of
`</Foo.Bar>`

Ben Kunkle created

4371228 Add move_path tool (#27366)

Click to expand commit body
<img width="629" alt="Screenshot 2025-03-24 at 10 06 39 AM"
src="https://github.com/user-attachments/assets/b099fcc0-b2f4-44ee-8c8f-416808363689"
/>

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Richard Feldman and Marshall Bowers created

f38ee81 Treat bun.lock as JSONC (#27359)

Click to expand commit body
Closes #27355 
This PR treat `bun.lock` file as `.jsonc`
note: 
[bun.lock](https://bun.sh/blog/bun-lock-text-lockfile) is a lockfile of
bun.js

Release Notes:

- Updated `bun.lock` files to be recognized as JSONC.

Acaibrid created

ddf8d07 Update cosmic text to 0.13.2 (#27362)

Click to expand commit body
Related #14222

Release Notes:

- This PR updates `cosmic-text` dependency on `gpui` crate from `0.11.2`
to 0.13.2`. This decreases RAM usage zed depending on the amount of
monospace fonts installed on the system. On Arch Linux with `nerd-fonts`
package installed (which provides around 2000 monospaced fonts), it
decreases ram usage from ~800mb to around ~300mb.

- Updated `cosmic-text` to `0.13.2` on `gpui` crate

Alvaro Parker created

7db9077 assistant2: Polish the thinking card (#27363)

Click to expand commit body
Mostly just adjusting spacing and making it consistent with how we
display other tool calls.

<img
src="https://github.com/user-attachments/assets/85892006-9029-4cb8-b805-bebe4232e458"
width="600px" />

Release Notes:

- N/A

Danilo Leal created

4e33aaa markdown_preview: Fix preview not rendering bullet points beginning with HTML (#27018)

Click to expand commit body
Closes #26631

Release Notes:

- Fixed markdown preview not rendering bullet points beginning with HTML

Before:
<img width="822" alt="before"
src="https://github.com/user-attachments/assets/102a7eac-fcc2-457b-9587-4a021800841d"
/>


After:
<img width="822" alt="after"
src="https://github.com/user-attachments/assets/8544b318-0efa-46c3-bd9b-c6c21444fab7"
/>

Note: I thought it would make sense to return `true` in `is_text_like`
for `Event::InlineMath` and `Event::DisplayMath` as well, but it looks
like rendering inline math is not supported at all at the moment:


https://github.com/zed-industries/zed/blob/4402e033a47db8ab6bf05623a9f111dc7b44cbd5/crates/markdown/src/parser.rs#L108

Nils Koch created

d253d46 Make python's file, line output clickable in terminal (#26903)

Click to expand commit body
Closes #16004.


![image](https://github.com/user-attachments/assets/73cfe9da-5575-4616-9ed0-99fcb3ab61f5)

Python formats file and line number references in the form `File
"file.py", line 8"`
I'm not a CPython expert, but from a quick look, they appear to come
from:
-
https://github.com/python/cpython/blob/80e00ecc399db8aeaa9f3a1c87a2cfb34517d7be/Python/traceback.c#L613
-
https://github.com/python/cpython/blob/80e00ecc399db8aeaa9f3a1c87a2cfb34517d7be/Python/traceback.c#L927
I am not aware of the possiblity to also encode the column information.

Release Notes:

- File, line references from Python, like 'File "file.py", line 8' are
now clickable in the terminal

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

Thorben Kröger and Kirill Bulatov created

07727f9 Update docs for some settings (#27293)

Click to expand commit body
- update tooltips of `auto_install_extensions` , `active_pane_modifiers`
- update docs of `auto_install_extensions`, `active_pane_modifiers`,
`buffer_line_height`

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>

Junseong Park and Kirill Bulatov created

08e8109 docs: Add Erlang language server documentation (#27346)

Click to expand commit body
This PR updates the Erlang docs to list the two language servers the
extension offers support for, as well as how to switch from `erlang_ls`
to `erlang-language-platform`.

Release Notes:

- N/A

AltCode created

f19e1e3 docs: Document how to use project-specific settings for Ruby LSP (#27310)

Click to expand commit body
I think it's helpful to illustrate how some settings can be added to the
project settings file rather than being global.

Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <peter@zed.dev>

Andy Waite and Peter Tripp created

8294b9f docs: Add tip for viewing LSP logs when configuring Ruby (#27318)

Click to expand commit body
Ruby LSP displays important information in its logs upon startup, such
as which formatter is detected. Being able to see this helps a lot when
configuring or troubleshooting.

cc @vitallium 

Release Notes:

- N/A

Andy Waite created

352c71f docs: Update Minitest example to clarify it only works with Rails (#27311)

Click to expand commit body
The example in the docs works with Rails but not plain minitest.

There are workarounds such as the [`m`](https://github.com/qrush/m) gem,
or adding ActiveSupport to a non-Rails project, but I feel they are
beyond the scope of the docs here.

Release Notes:

- N/A

Andy Waite created

9f0b090 Rename LSP function and simplify tests (#27313)

Click to expand commit body
While working on a fix I found opportunities to improve readability, but
it's a big rename diff, so I'm landing separately.

Release Notes:

- N/A

João Marcos created

f4d1e79 Improve Regex syntax highlighting (#25332)

Click to expand commit body
Release Notes:

  - Improved Regex syntax highlighting

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/2a0bb1d9-cbba-490c-b2be-08c94bc79517)
|
![Image](https://github.com/user-attachments/assets/b19f3871-ee83-4165-a026-207bdbbcad44)
|

- `(?P=`, `<`: `punctuation.bracket`
- `group_name`: `property` -> `label`
- `^`, `$`: `string.escape` -> `operator`
- `\b`, `\B`, `\k`: `string.escape` -> `keyword.operator`
- added `regex` scope to target regex tokens specifically

```js
regex = /^(?<group>[!\.\?])\b[a-z]+word\k<group>$/g
```

---------

Co-authored-by: João Marcos <marcospb19@hotmail.com>

chbk and João Marcos created

044eb7b extensions_ui : Scroll to top on filter change (#27305)

Click to expand commit body
Closes #27100


https://github.com/user-attachments/assets/0fc1409d-01c1-4caa-a2ed-762c8951930f

Release Notes:

- N/A

Smit Barmase created

d96a50b extensions_ui: Add scrollbar (#27303)

Click to expand commit body
This PR adds scrollbar to extensions page. 

For now haven't added setting to hide or configure this scrollbar, can
be handled later.

<img width="1258" alt="image"
src="https://github.com/user-attachments/assets/0d260051-5e4a-4e3f-9738-b5c5a988419e"
/>


Release Notes:

- Added scrollbar to extensions page.

Smit Barmase created

b5e5959 terminal: Make `alternate_scroll` on by default (#27302)

Click to expand commit body
Most terminal emulators, like macOS Terminal, Alacritty, and Ghostty,
have alternate scroll turned on by default. I think it makes sense for
the Zed terminal to do the same and make it more of an opt-out feature.

Release Notes:

- N/A

Smit Barmase created

9918b6c Scroll to follow expanding part of `editor::SelectLargerSyntaxNode` (#27295)

Click to expand commit body
When the selection grows both ways, the new code prioritizes the top
part instead of bottom one, this is usually more helpful considering
that most programming language grammars tend to define tokens right
before large delimited blocks, and rarely after (because humans and
parsers read from top to bottom).

Also, revert selection when convenient, so you have more control over
what you're selecting, looking at the selection `head` is commonly more
convenient than at the `tail`.

Release Notes:

- Improve scrolling of `editor::SelectLargerSyntaxNode` for better
visibility.

João Marcos created

fa677bd vim: Single quote mark (#27231)

Click to expand commit body
Closes #22398

Release Notes:

- vim: Adds `'` and `"` marks (last location jumped from in the current
buffer, and location when last exiting a buffer)

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

AidanV and Conrad Irwin created

d82b547 vim: View Marks (#26885)

Click to expand commit body
Closes #26884

Release Notes:

- vim: Added `:marks` which brings up list of current marks
- confirming on selected mark in the view jumps to that mark

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

AidanV and Conrad Irwin created

4c86cda Prompt before running some tools (#27284)

Click to expand commit body
Also includes some fixes for how the Lua tool was being generated.

<img width="644" alt="Screenshot 2025-03-21 at 6 26 18 PM"
src="https://github.com/user-attachments/assets/51bd1685-5b3f-4ed3-b11e-6fa8017847d4"
/>


Release Notes:

- N/A

---------

Co-authored-by: Ben <ben@zed.dev>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>

Richard Feldman , Ben , Agus Zubiaga , Joseph T. Lyons , Danilo Leal , and Ben Kunkle created

90649fb Automatically expand context for inline assistant to nearest block (#27282)

Click to expand commit body
Release Notes:

- Inline assistant will now expand empty selections to the block under
the cursor.

Co-authored-by: andrew j <andjones100@gmail.com>

Conrad Irwin and andrew j created

c783fd0 zed: Add `--system-specs` arg (#27285)

Click to expand commit body
Adds the `--system-specs` flag to the Zed binary, so that users who wish
to report issues can retrieve their system specs, even if Zed is failing
to launch

Still TODO:
- [x] Test and do best effort GPU info detection on Linux
- [ ] Modify GitHub issue templates to tell users that the flag is
available if they are unable to launch Zed

Release Notes:

- Added the `--system-specs` flag to the Zed binary (not the cli!), to
retrieve the system specs we ask for in GitHub issues without needing to
open Zed

Ben Kunkle created

85a761c markdown_preview: Fix rendering image not at all or too often (#25592)

Click to expand commit body
Before MarkdownParagraphChunk::Image was pushed for every Text event if
we're currently inside an image. This was wrong since pulldown-cmark
parses `![](foo)` as:

Start(Image { link_type: Inline, dest_url: "foo", title: "", id: "" })
    End(Image)

If there is no alt text, no Text event is emitted. Which caused images
without any alt text not to be rendered at all.

For alt texts containing inline formatting this was even more obviously
broken since e.g. `![foo *bar* baz](foo)` gets parsed as:

Start(Image { link_type: Inline, dest_url: "foo", title: "", id: "" })
      Text(Borrowed("foo "))
      Start(Emphasis)
        Text(Borrowed("bar"))
      End(Emphasis)
      Text(Borrowed(" baz"))
    End(Image)

which for this example caused the image to appear 3 times in the
preview.

This commit fixes these two bugs which have existed since the
introduction of the image previews in
96854c68eadd1dd72aa379368fde3cea791498a4.

Release Notes:

- Fixed images in the markdown preview appearing not at all or too
often.

Martin Fischer created

739f45e Clear breakpoints action (#27254)

Click to expand commit body
This PR adds an action that clears all breakpoints and notifies any
active DAPs.

todo
- [x] Implement clear functionality
- [x] Write an integration test for this

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Piotr Osiewicz <peterosiewicz@gmail.com>

Anthony Eid and Piotr Osiewicz created

16ad742 zlog: Init (#27273)

Click to expand commit body
Scaffolding for a revised way of logging in Zed. Very WIP, but the idea
is to allow maintainers to tell users to paste
```json
{
    "log": {
        "project.format": "trace"
    }
}
```
into their settings so that even trace logs are emitted for the log
statements emitted from a logger under the `project.format` scope.

The plan is to eventually implement the `Log` trait from the `log` crate
instead of just wrapping the `log` crate, which will simplify the
implementation greatly, and remove our need for both the `env_logger`
and `simplelog` crates.
Additionally, work will be done to transition to using the scoped
logging APIs throughout the app, focusing on bug hotspots to start
(currently, scoped logging is only used in the format codepath).

Release Notes:

- N/A

Ben Kunkle created

b32c792 assistant2: Polish spacing and alignment (#27264)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <1789+nathansobo@users.noreply.github.com>

Danilo Leal and Nathan Sobo created

1db621d Refactor TextLayout to use Rc<RefCell> instead of Arc<Mutex> for improved performance (#27177)

Click to expand commit body
Since `TextLayout` is not shared by multiple threads, changing it to
`Rc<RefCell<T>>` should improve performance.

I also found several codes with the same problem. If you think this
change is beneficial, I will continue to improve it in the subsequent
PR. 🙂

Release Notes:

- N/A

Sunli created