This PR splits up the rendering of the message editor into multiple
functions. Previously we had a single `h_flex()...` expression which
spanned across 550 lines, `cargo fmt` stopped working.
Release Notes:
- N/A
Bennet Bo Fenner
created
62ebae9
agent: Only show recommended models that are actually configured (#28613)
This code was used before we had a proper completion menu for
at-mentions
Release Notes:
- N/A
Bennet Bo Fenner
created
b22faf9
agent: Refine language model selector (#28597)
Click to expand commit body
Release Notes:
- agent: Show recommended models in the agent model selector and display
the provider in the model selector's trigger.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Bennet Bo Fenner
,
Danilo Leal
, and
Danilo Leal
created
dafe994
agent: Register tracked buffers with language servers (#28610)
Click to expand commit body
Release Notes:
- agent: Start language servers when accessing files via tools
Co-authored-by: Michael <michael@zed.dev>
This should allow tests to be more similar across platforms.
Release Notes:
- N/A
Conrad Irwin
created
97a9a5d
snippets: Fix snippets for PHP and ERB languages (#27718)
Click to expand commit body
Closes #21541
Closes #22726
This should fix snippets in languages, like PHP, that are based on the
HTML syntax layer. To be honest, I don't totally get where HTML comes
into it, but the issues outlined in #21541 and #22726 both boil down to
"Zed only shows me HTML snippets in PHP/ERB files; I expected to see
PHP/ERB snippets". This solution is based on the comments between
@mrnugget and @osiewicz in #22726: resolve/combine snippets for all
language layers at the given position, whereas current behavior is to
resolve snippets only for the `.last()` language layer at the given
position.
- add `Buffer:languages_at()` (note the plural)
- update `snippet_completions()` in `editor.rs` to loop over each
language, gathering snippets as it goes
- the primary logic for resolving snippets within a single language has
not changed
### Verifying this change
I couldn't find tests related to snippet and currently active languages
(CI may show them to me 😆 ) but I can add some if desired and w/ perhaps
a little coaching or prompting about another test to look to for
inspiration. I have confirmed that this works for PHP, but I have not
checked ERB because I'm not familiar with it or set up for it.
To check this manually:
1. install the PHP extension
2. install at least 1 snippet for each of html, php and phpdoc. If you
don't have any, these should work:
```sh
# BEWARE these will clobber existing snippets!
echo '{"dddd":{"body":"hello from phpdoc"}}' > ~/.config/zed/snippets/phpdoc.json
echo '{"pppp":{"body":"hello from PHP"}}' > ~/.config/zed/snippets/php.json
echo '{"hhhh":{"body":"hello from HTML"}}' > ~/.config/zed/snippets/html.json
```
3. open any PHP file. If you don't have one, here's one that should
work:
```php
<?php
/**
*
*/
function function_name()
{
}
```
4. Place your cursor in a PHPdoc comment (eg after the `/**` on line 3)
- you should be able to use the `dddd`, `pppp` and `hhhh` snippets; on
`main`, only the `dddd` snippet works here
5. Move your cursor to a non-comment PHP area (eg after the `{` on line
7)
- you should be able to use the `pppp` and `hhhh` snippets, but not
`dddd`; on `main`, only `hhhh` works here
### Performance
This adds 2 separate (not nested) loops to `snippet_completions()`, each
of which will iterate over the active language scopes at the given
location. I have not looked into the specifics of how many layers most
languages have, but I suspect that *most* users will see identical
performance as before because there will only be 1 scope active most of
the time.
In some cases, though (eg PHP, ERB, maybe template strings in JS), the
editor will be looping over more layers, possibly many in some deeply
injected/embedded cases (I'm thinking of a regex template string in a JS
heredoc string in a PHP script in an HTML file). I don't expect this to
be an issue – nor has it been in my usage and testing – but performance
of snippets could be affected in pathological cases.
### Alternate solutions
Instead of resolving snippets for *all* layers, we could just change how
we pick which language to resolve. Instead of always using `.last()`,
perhaps we could do something more clever. This feels like it could be
tricky and potentially error prone, though.
Release Notes:
- Snippets are now resolved for all languages active at the cursor
location.
- Fixed snippets in PHP, ERB and other languages whose syntax layers are
based on HTML
claytonrcarter
created
730f2e7
vim: Add highlighting to set commands (#28600)
141ad72
extension: Use `heck` instead of `convert_case` for snake_case check (#28608)
Click to expand commit body
This PR updates the snake_case check for grammar names to use `heck`
instead of `convert_case`.
`heck` correctly handles values like `d2`.
Fixes https://github.com/zed-industries/zed/issues/28583.
Release Notes:
- Updated snake_case check for grammar names in extensions.
While working on implementing `add_recent_documents` for Windows, I
found that the process is significantly more complex compared to macOS.
On macOS, simply registering the `add_recent_documents` function is
enough, as the system handles everything automatically.
On Windows, however, there are two cases to consider:
- **Files opened by the app**: These appear in the "Recent" section (as
shown in the screenshot, "test.txt") and are managed automatically by
Windows (by setting windows registry), similar to macOS.

- **Folders opened by the app**: This is more complicated because
Windows does not handle it automatically, requiring the application to
track opened folders manually.
To address this, this PR introduces a `History Manager` along with
`HistoryManagerEvent::Update` and `HistoryManagerEvent::Delete` events
to simplify the process of managing recently opened folders.
https://github.com/user-attachments/assets/a2581c15-7653-4faf-96b0-7c48ab1dcc8d
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
In https://github.com/zed-extensions/haskell/pull/2 the HLS settings
were updated to respect binary path/argument overrides. This PR just
updates the docs to demonstrate this.
Release Notes:
- N/A
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
This is a no-op change which just adds comments.
Release Notes:
- N/A
Peter Tripp
created
6a60bb1
ci: No draft releases when using 'run-bundling' (#28596)
Click to expand commit body
Improve the logic in around release artifact bundling.
- Suppress a harmless "error: no such command: `about`" from
script/generate-licenes output
- Remove checks for main branch (which will never be true)
- Only run `Upload Artifacts to release` when not using `run-bundling`.
Prevents the creation of draft releases with just linux remote server binaries)
Release Notes:
- N/A
- Name of source is only used as a fallback if there's no path
- Make the frames a bit more compact.

Release Notes:
- N/A
Piotr Osiewicz
created
c2e3134
Try to weak-link ScreenCaptureKit always (#28585)
66b3e03
Fix a bug causing stale optimistic state in the git panel (#28588)
Click to expand commit body
Release Notes:
- Fixed a bug that caused the staged status of files in the git panel to
be out of date in some cases.
Cole Miller
created
7caa2c2
debugger: Prompt user when they try to close a running debug session (#28584)
Click to expand commit body
Closes #ISSUE
Release Notes:
- N/A
Piotr Osiewicz
created
08ce230
vim: Add some forced motion support (#27991)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/20971
Added `v` input to yank and delete to override default motion. The
global vim state tracking if the forced motion flag was passed handled
the same way that the count is. [The main chunk of code maps the motion
kind from the default to the overridden
kind](https://github.com/zed-industries/zed/pull/27991/files#diff-2dca6b7d1673c912d14e4edc74e415abbe3a4e6d6b37e0e2006d30828bf4bb9cR1249-R1254).
To handle the case of deleting a single character (dv0) at the start of
a row I had to modify the control flow
[here](https://github.com/zed-industries/zed/pull/27991/files#diff-2dca6b7d1673c912d14e4edc74e415abbe3a4e6d6b37e0e2006d30828bf4bb9cR1240-R1244).
Then to handle an exclusive delete till the end of the row (dv$) I
[saturated the endpoint with a left
bias](https://github.com/zed-industries/zed/pull/27991/files#diff-2dca6b7d1673c912d14e4edc74e415abbe3a4e6d6b37e0e2006d30828bf4bb9cR1281-R1286).
Test case: dv0
https://github.com/user-attachments/assets/613cf9fb-9732-425c-9179-025f3e107584
Test case: yvjp
https://github.com/user-attachments/assets/550b7c77-1eb8-41c3-894b-117eb50b7a5d
Release Notes:
- Added some forced motion support for delete and yank
Closes #10211
Closes #7575
Screenshot of feature:

Screenshot of proposed menu:

Screenshot of proposed menu closed:

Release Notes:
- Configuration of bottom_dock_layout in settings.json
- Layout Mode button in Title Bar
- 4 different layout modes for the bottom dock: contained (default),
full (extends below both docks), left-aligned, right-aligned (extends
only below the respective dock)
---------
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
https://github.com/user-attachments/assets/0be12a9a-f6ce-4eca-90de-6ef01eb41ff9
- Allows the active ComponentPreview page to be restored via
serialization
- Allows filtering components using a filter input
- Updates component example rendering
- Updates some components
Release Notes:
- N/A
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nate Butler
and
Max Brunsfeld
created
a03fb37
docs: Fix name for `zed: open project tasks` command (#28578)
Click to expand commit body
There's no `zed: open local tasks`, perhaps it was called that
previously.
Release Notes:
- N/A
Andy Waite
created
dd7bc5f
vim: Add delete keymapping to vim.json (#28551)
Click to expand commit body
Closes #16511
Added test for delete in normal mode and keymapping in vim.json
Release Notes:
- Added delete mapping in normal mode
bd4c9b4
editor: Fix signature help popover goes off screen (#28566)
Click to expand commit body
Closes #27731
Uses similar logic as other popovers for layouting signature help
popover.
Release Notes:
- Fixed case where signature help popover goes off the screen.
Smit Barmase
created
d4736a5
debugger: Fix bug where deleting a breakpoint could delete multiple breakpoints (#28562)
Click to expand commit body
This PR fixes a bug when deleting a breakpoint with a (log, conditional,
hit condition) message by removing the message. All breakpoints that
contain that type of message were also deleted.
Release Notes:
- N/A
Fixes a regression introduced in
https://github.com/zed-industries/zed/pull/28377 where the pending hunks
didn't get cleared properly when staging/unstaging hunks remotely. I
didn't add new tests, because the fix was to simplify some code.
Release Notes:
- N/A
Max Brunsfeld
created
ad39d32
Add new actions `editor::FindNextMatch` and `editor::FindPreviousMatch` (#28559)
Click to expand commit body
Closes #7903
Release Notes:
- Add new actions `editor::FindNextMatch` and
`editor::FindPreviousMatch` that are similar to `editor::SelectNext` and
`editor::SelectPrevious` with `"replace_newest": true`, but jumps to the
first or last selection when there are multiple selections.
João Marcos
created
c35238b
debugger: Add support for setting multiple breakpoints via actions (#28437)
Click to expand commit body
Allow setting multiple breakpoints with multi cursors
Release Notes:
- N/A
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Anthony <anthony@zed.dev>
Piotr Osiewicz
,
Anthony Eid
,
Remco Smits
, and
Anthony
created
5757e35
agent: Fix bug where wrong crease for @mention would be displayed (#28558)
Click to expand commit body
Release Notes:
- agent: Fix a bug where an inserted @mention did not show up as the one
that was selected
Bennet Bo Fenner
created
c124838
agent: Fix "new text thread" action name (#28555)
Click to expand commit body
Moving from "NewPromptEditor" to "NewTextThread". We recently re-named
that and this was missing.
Release Notes:
- N/A
Danilo Leal
created
5ebac7e
agent: Clean up thread auto-capturing (#28550)
Click to expand commit body
This PR cleans up the thread auto-capturing added in #28271.
- Removed usage of `unsafe`
- Fixed feature flag check
- We were incorrectly not respecting the feature flag in release builds
- Made sure the telemetry event was being run on the background executor
Release Notes:
- N/A
Earlier, I merged #24723
Before merging it, I made a change that was incorrect and fast followed
with a fix: #28548
Following that fix, @bennetbo discovered that the modals where no longer
highlighting correctly, particularly the outline modal.
So I'm going to revert it all.
Release Notes:
- N/A
Mikayla Maki
created
71c2a11
agent: Make the message editor expandable (#28420)
Click to expand commit body
This PR allows expanding the message editor textarea to fit almost the
total height of the Agent Panel. Stylistically, I'm also changing the
font family we use in the textarea to use the buffer font; want to
experiment with this for a bit.
Release Notes:
- agent: The Agent Panel textarea can now be expanded to fill almost the
total height of the panel.
---------
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Danilo Leal
,
Bennet Bo Fenner
, and
Bennet Bo Fenner
created
2440faf
Actually run the eval and fix a hang when retrieving outline (#28547)
Click to expand commit body
Release Notes:
- Fixed a regression that caused the agent to hang sometimes.
---------
Co-authored-by: Thomas Mickley-Doyle <tmickleydoyle@gmail.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Antonio Scandurra
,
Thomas Mickley-Doyle
,
Nathan Sobo
, and
Michael Sloan
created
c0262cf
Fix bug where all editor completions would be black (#28548)
Click to expand commit body
Release Notes:
- N/A
Mikayla Maki
created
fd256d1
gpui: Keep drag cursor style when dragging (#24797)
Click to expand commit body
Release Notes:
- Improve to keep drag cursor style on dragging resize handles.
---
### Before
https://github.com/user-attachments/assets/d4100d01-ac02-42b8-b923-9f2b4633c458
### After
https://github.com/user-attachments/assets/b5a450cd-c6de-4b39-a79c-2d73fcbad209
With example:
```
cargo run -p gpui --example drag_drop
```
https://github.com/user-attachments/assets/4cba1966-1578-40ce-a435-64ec11bcace5
This PR lightly refactors the `EditorMode::Full` exposing two new
methods: `is_full` and `set_mode`.
Motivation is to expose fields that modify the behavior when the editor
is in `Full` mode. By using is `mode.is_full()` instead of
`EditorMode::Full` we can introduce new fields without breaking other
places in the code.
Release Notes:
- N/A
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Fixes https://github.com/zed-industries/zed/issues/26039
Release Notes:
- Fixed an issue where diffs stopped updating closing and reopening them
after staging hunks.
- Fixed a bug where staging a hunk while the cursor was in a deleted
line would move the cursor erroneously.
---------
Co-authored-by: Cole Miller <m@cole-miller.net>
Co-authored-by: João Marcos <marcospb19@hotmail.com>
Max Brunsfeld
,
Cole Miller
, and
João Marcos
created
ffdf725
gpui: Fix text hover & active style (#24723)
Click to expand commit body
Release Notes:
- N/A
---
Fix this long-standing issue so that we can support Link hover colors.
And renamed `text_layout` example to `text_style`.
---
I spent some time studying the process of this text style change and
found it a bit complicated.
At first, I thought there was a problem with refine and it was not
passed properly. After changing it, I found that it was not the problem.
Then I found that it was because `TextRun` had already stored the
`color`, `background`, `underline`, `strikethrough` in TextRun in the
`request_layout` stage. They area calculate at the `request_layout`
stage, but request_layout stage there was no `hitbox`, so the hover
state was not obtained.
```bash
cargo run -p gpui --example text_style
```
https://github.com/user-attachments/assets/24f88f73-775e-41d3-a502-75a7a39ac82b
---------
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Jason Lee
and
Mikayla Maki
created
8ee6a2b
html: Fix leading slash on Windows paths (#28542)
Click to expand commit body
This PR builds on the fix proposed in
[zed-extensions/astro#5](https://github.com/zed-extensions/astro/pull/5)
and serves as a workaround for certain LSPs affected by
[zed-industries/zed#20559](https://github.com/zed-industries/zed/issues/20559)—specifically,
the HTML language server in this case.
Credit to @maxdeviant for identifying and implementing the original fix.
This PR extends that solution to other areas where it may be beneficial.
Release Notes:
- N/A
vipex
created
cf65d94
debugger: Add console indicator and resolve debug configs from NewSessionModal (#28489)
Click to expand commit body
The debug console will now show an indicator when it's unopened and
there's unread messages.
`NewSessionModal` attempts to resolve debug configurations before using
the config to start debugging. This allows users to use zed's task
variables in the modal prompt.
I had to invert tasks_ui dependency on debugger_ui so `NewSessionModal`
could get the correct `TaskContexts` by calling tasks_ui functions. A
consequence of this workspace has a new event `ShowAttachModal` that I'm
not a big fan of. @osiewicz if you have time could you please take a
look to see if there's a way around adding the event. I'm open to pair
on it too.
Release Notes:
- N/A
Anthony Eid
created
66dd672
zlog: Support configuring log levels with env var (#28544)
Click to expand commit body
Reimplemented logic from `env_logger` to parse log configuration from
environment variables.
Had to re-implement instead of using `env_filter` crate that
`env_logger` uses, as it does not export the information required to
integrate it.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Ben Kunkle
created
44cb8e5
markdown: Track code block metadata in parser (#28543)
Click to expand commit body
This allows us to not scan the codeblock content for newlines on every
frame in `active_thread`
Release Notes:
- N/A
Bennet Bo Fenner
created
73305ce
Change zed.dev's default model to Claude 3.7 Sonnet (#28541)
Click to expand commit body
From Claude 3.5 Sonnet to **Claude 3.7 Sonnet**.
Release Notes:
- Change the default model of Zed's hosted LLM service to Claude 3.7
Sonnet.
Danilo Leal
created
94b75f3
gpui: Enable per-pixel, GPU composited transparency on Windows (#26645)
Click to expand commit body
Move the SetLayeredWindowAttributes call to immediately after window
construction, and initialize it with per-pixel transparency settings, no
color key and no global blending. The render pipeline will perform alpha
blending during compositing.
Cleaned up the DWM acrylic API calls some, to explicitly set to the
three appropriate modes depending on opaque, transparent or blurred
settings. The API internally hides versioning concerns from the caller.
Set the window class background color to black, this prevents a
flashbang on slow startup, e.g. debug builds on a heavily loaded system.
The outcome is that the window no longer receives paint demands for
underlying window updates, while also having per-pixel transparency -
opaque theme elements are now correctly opaque. The transparency
settings are now portable across windows and macOS having mostly similar
outcomes (modulo palette differences). Small fonts may still appear to
be alpha blended - this seems to be in the glyph atlas, their pixels are
not actually opaque. Larger fonts (or higher DPIs) don't suffer this and
are as opaque as expected. Layering the window atop one that is
rendering at 120fps, the editor window can drop to its 8fps idle state,
while still being composited with 120fps alpha blend in the background,
in both blur and transparent modes.
Updates #20400
Release Notes:
- Improved transparency on Windows to be more efficient, support fully
opaque elements and more closely match other platforms.
James Tucker
created
384868e
Add --user-data-dir CLI flag and propose renaming support_dir to data_dir (#26886)
Click to expand commit body
This PR introduces support for a `--user-data-dir` CLI flag to override
Zed's data directory and proposes renaming `support_dir` to `data_dir`
for better cross-platform clarity. It builds on the discussion in #25349
about custom data directories, aiming to provide a flexible
cross-platform solution.
### Changes
The PR is split into two commits:
1. **[feat(cli): add --user-data-dir to override data
directory](https://github.com/zed-industries/zed/pull/26886/commits/28e8889105847401e783d1739722d0998459fe5a)**
2. **[refactor(paths): rename support_dir to data_dir for cross-platform
clarity](https://github.com/zed-industries/zed/pull/26886/commits/affd2fc606b39af1b25432a688a9006229a8fc3a)**
### Context
Inspired by the need for custom data directories discussed in #25349,
this PR provides an immediate implementation in the first commit, while
the second commit suggests a naming improvement for broader appeal.
@mikayla-maki, I’d appreciate your feedback, especially on the rename
proposal, given your involvement in the original discussion!
### Testing
- `cargo build `
- `./target/debug/zed --user-data-dir ~/custom-data-dir`
Release Notes:
- Added --user-data-dir CLI flag
---------
Signed-off-by: Marko Kungla <marko.kungla@gmail.com>