fb410ab
Support relative line number on wrapped lines (rework) (#41805)
Click to expand commit body
## Add relative line numbers on wrapped lines, take 2
This is a rework of https://github.com/zed-industries/zed/pull/39268
that excludes
https://github.com/zed-industries/zed/pull/39268/commits/e7096d27a6463f6eb7c2a821637c5773b2460c10.
This commit introduced some line number rendering issues as described in
https://github.com/zed-industries/zed/issues/41422.
While @ConradIrwin suggested we try to pass in the buffer rows from the
calling method instead of the snapshot, that
appears to have had unintended consequences and I don't think the two
calculations were intended to do the same thing. Hence, this PR has
removed those changes.
This PR also includes the migration fix originally done by @MrSubidubi
in https://github.com/zed-industries/zed/pull/41351.
## Original PR description and release notes.
**Problem:** Current relative line numbering creates a mismatch with
vim-style navigation when soft wrap is enabled. Users must mentally
calculate whether target lines are wrapped segments or logical lines,
making `<n>j/k` navigation unreliable and cognitively demanding.
**How things work today:**
- Real line navigation (`j/k` moves by logical lines): Requires
determining if visible lines are wrapped segments before jumping. Can't
jump to wrapped lines directly.
- Display line navigation (`j/k` moves by display rows): Line numbers
don't correspond to actual row distances for multi-line jumps.
**Proposed solution:** Count and number each display line (including
wrapped segments) for relative numbering. This creates direct
visual-to-navigational correspondence, where the relative number shown
always matches the `<n>j/k` distance needed.
**Benefits:**
- Eliminates mental overhead of distinguishing wrapped vs. logical lines
- Makes relative line numbers consistently actionable regardless of wrap
state
- Preserves intuitive "what you see is what you navigate" principle
- Maintains vim workflow efficiency in narrow window scenarios
Also explained and discussed in
https://github.com/zed-industries/zed/discussions/25733.
Release Notes:
- Added support for counting wrapped lines as relative lines and for
displaying line numbers for wrapped segments. Changes
`relative_line_numbers` from a boolean to an enum: `enabled`,
`disabled`, or `wrapped`.
This PR adds the ability to configure which files are considered
"hidden" in the project panel and toggle their visibility with a
keyboard shortcut. Previously, the editor hardcoded dotfiles as hidden -
now users can customize the pattern and quickly show/hide them.
### Release Notes
- Added `project_panel::ToggleHideHidden` action with keyboard shortcuts
to toggle visibility of hidden files
- Added configurable `hidden_files` setting to customize which files are
marked as hidden (defaults to `**/.*` for dotfiles)
### Motivation
This change allows users to:
1. Quickly toggle hidden file visibility with a keyboard shortcut
2. Customize which files are considered "hidden" beyond just dotfiles
3. Better organize their project panel by hiding build artifacts, logs,
or other generated files
### Usage
**Toggle hidden files:**
- **macOS:** `cmd-alt-.`
- **Linux:** `ctrl-alt-.`
- **Windows:** `ctrl-alt-.`
**Customize patterns in settings:**
```json
{
"hidden_files": ["**/.*", "**/*.tmp", "**/build/**"]
}
```
### Changes
**Core Implementation:**
- Added `hidden_files` setting (defaults to `**/.*` to match current
dotfile behavior)
- Replaced hardcoded `name.starts_with('.')` logic with configurable
pattern matching using `PathMatcher`
- Hidden status propagates through directory hierarchies (if a directory
is hidden, all children inherit that status)
**User-Facing:**
- Added `ToggleHideHidden` action in the project panel
- Added keyboard shortcuts for all platforms
- Added settings UI entry for configuring `hidden_files` patterns
**Testing:**
- Added comprehensive test coverage validating default behavior, custom
patterns, propagation, and settings changes
### Implementation Notes
- Uses `PathMatcher` for efficient glob matching
- Settings changes automatically trigger worktree re-indexing
- No breaking changes - defaults maintain current behavior (hiding
dotfiles)
---
**Disclaimer:** This was implemented with a fair amount of copy/paste
(particularly the gitignore handling), trial and error, and a healthy
dose of Claude.
### Screenshots
**Project Panel with hidden files visible:**
<img width="1368" height="935" alt="Screenshot 2025-10-30 at 3 15 53 AM"
src="https://github.com/user-attachments/assets/1cbe90ce-504c-4f9b-bca8-bef02ab961be"
/>
**Project Panel with hidden files hidden:**
<img width="1363" height="917" alt="Screenshot 2025-10-30 at 3 16 07 AM"
src="https://github.com/user-attachments/assets/9297f43e-98c7-4b19-be8f-3934589d6451"
/>
**Toggle action in command palette:**
<img width="565" height="161" alt="Screenshot 2025-10-30 at 3 17 26 AM"
src="https://github.com/user-attachments/assets/4dc9e7b6-9c29-4972-b886-88d8018905da"
/>
Release Notes:
- Added the ability to configure glob patterns for files treated as
hidden in the project panel using the `hidden_files` setting.
- Added an action `project panel: toggle hidden files` to quickly show
or hide hidden files in the project panel.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
B. Collier Jones
and
Smit Barmase
created
fb6e41d
remote_server: Fix panic due to invalid settings access (#41904)
0ec31db
util: Add missing quotes in shell env capturing on windows (#41902)
Click to expand commit body
Release Notes:
- Fixed shell env capturing failing if zed is installed on a path with
whitespace in it
Lukas Wirth
created
a262ca1
util: Log JSON with envs if failed to deserialize (#41894)
Click to expand commit body
Release Notes:
- N/A
Jakub Konka
created
6a38d69
Fix autoupdate nuking the app on Windows (#41571)
Click to expand commit body
Closes #41477
Release Notes:
- N/A
localcc
created
95feefc
remote: Fix terminal crash on Elvish shell (#41893)
Smit Barmase
created
a827f25
file_finder: Respect .gitignore and file_scan_inclusions with ** in glob (#40654)
Click to expand commit body
Closes #39037
Previously, the code split the `**/.env` glob in `file_scan_inclusions`
into two sources for the `PathMatcher`: `["**", "**/.env"]`. This
approach works for directories, but including `**` will match all
directories and their files. To address this, I now select the
appropriate `PathMatcher` using only `**/.env` when specifically
targeting a file to determine whether to include it in the file finder.
Release Notes:
- Fixed: respect `.gitignore` and `file_scan_inclusions` settings with
`**` in glob for file finder
---------
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Coenen Benjamin
and
Julia Ryan
created
cc6208b
Show inlay label parts' tooltips if those are present and hovered (#41889)
Click to expand commit body
Part of https://github.com/zed-industries/zed/issues/33715
https://github.com/user-attachments/assets/d2d6f47d-3974-4c8c-aab9-9046891186bf
Unlike VSCode that does more advanced hovering, this one only works for
inlays with tooltip LSP data in them.
Release Notes:
- Started to show inlay label parts' tooltips when they are hovered
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Kirill Bulatov
and
Lukas Wirth
created
8d15ec7
vim: Fix mini delimiters in multibuffer (#41834)
Click to expand commit body
- Update `vim::object::find_mini_delimiters` in order to filter out the
ranges before calling `vim::object::cover_or_next`, ensuring that the
provided ranges are converted from multibuffer space into buffer
space.
- Remove the `range_filter` from `vim::object::cover_or_next` was the
`find_mini_delimiters` function is the only caller and no longer uses
it
Closes #41346
Release Notes:
- Fixed a crash that could occur when using `vim::MiniQuotes` and
`vim::MiniBrackets` in a multibuffer
Dino
created
ca5a4dc
terminal: Resolve env based on the project dir on the target (#41867)
Click to expand commit body
Prior to this change we would always resolve envs when spawning a new
terminal window based on the inherited CLI environment. This works fine
as long as we open a new Zed instance in the terminal when using it
locally only. When using Zed connected to a remote server, it would not
be meaningful however. WIth this change, we correctly ping the remote
for the project-local envs and use that instead. This change should also
fix a pesky issue when updating Zed - after Zed restarts, opening a new
terminal window will not run `direnv` for example.
Release Notes:
- N/A
Related discussions #26084
Worktree creations are implemented similar to how branch creations are
handled on the branch picker (the user types a new name that's not on
the list and a new entry option appears to create a new branch with that
name).
https://github.com/user-attachments/assets/39e58983-740c-4a91-be88-57ef95aed85b
With this picker you have a few workflows:
- Open the picker and type the name of a branch that's checked out on an
existing worktree:
- Press enter to open the worktree on a new window
- Press ctrl-enter to open the worktree and replace the current window
- Open the picker and type the name of a new branch or an existing one
that's not checked out in another worktree:
- Press enter to create the worktree and open in a new window. If the
branch doesn't exists, we will create a new one based on the branch you
have currently checked out. If the branch does exists then we create a
worktree with that branch checked out.
- Press ctrl-enter to do everything on the previous point but instead,
replace the current window with the new worktre.
- Open the picker and type the name of a new branch or an existing one
that's not checked out in another worktree:
- If a default branch is detected on the repo, you can create a new
worktree based on that branch by pressing ctrl-enter or
ctrl-shift-enter. The first one will open a new window and the last one
will replace the current one.
Note: If you preffer to not use the system prompt for choosing a
directory, you can set `"use_system_path_prompts": false` in zed
settings.
Release Notes:
- Added git worktree picker to open a git worktree on a new window or
replace the current one
- Added git worktree creation action
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Alvaro Parker
and
Cole Miller
created
57adf42
agent_ui: Add profiles item in the panel menu (#41871)
Click to expand commit body
Making the profile management modal accessible through the agent panel
additional options menu as well. And in the process, adjusting the menu
keybinding that was getting conflicted with something else.
Release Notes:
- N/A
Danilo Leal
created
4cdcb0c
agent_ui: Improve display of external agents in configuration view (#41869)
Click to expand commit body
This PR makes the agent panel's configuration view use the icon from an
external agent that comes directly from the extension, as well as some
other clean ups.
Release Notes:
- N/A
Danilo Leal
created
9113a20
Shell out to real tar in extension builder (#41856)
Click to expand commit body
We see `test_extension_store_with_test_extension` hang in untarring the
WASI SDK some times.
In lieu of trying to debug the problem, let's try shelling out for now
in the hope that the test becomes more reliable.
There's a bit of risk here because we're using async-tar for other
things (but probably not 300Mb tar files...)
Assisted-By: Zed AI
Closes #ISSUE
Release Notes:
- N/A
Conrad Irwin
created
1631cec
Add zeta-cli subcommand for running zeta2 predictions (#41722)
Click to expand commit body
This PR adds a `zeta zeta2 predict` subcommand that takes an edit
prediction example markdown file as an argument, and performs zeta2's
prediction, showing the retrieved context and the predicted edit.
* [x] Apply uncommitted diff to get repo into the right state.
* [x] Apply edits in edit history
* [x] Display predicted edits as unified diff, regardless of model
output format
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
Max Brunsfeld
,
Agus Zubiaga
,
Piotr Osiewicz
, and
Ben Kunkle
created
5e41ce1
Do not pull diagnostics when those are disabled (#41865)
Click to expand commit body
Based on
[hang.log](https://github.com/user-attachments/files/23319081/hang.log)
Release Notes:
- N/A
Kirill Bulatov
created
5ed4584
Copy outline improvements from typescript over to tsx as well (#41862)
Click to expand commit body
Closes #4483
Release Notes:
- Interprets outline of tsx files with the same grammar as typescript,
including improvements from #39797
KyleBarton
created
9ecf257
Fix incorrect search ranges when rendering search matches in the outline panel (#41859)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/41792
Release Notes:
- Fixed outline panel panicking when rendering certain search matches
Kirill Bulatov
created
2eeb023
editor: Add a setting to show a scrollbar in completion menu (#41849)
Click to expand commit body
A user on Discord requested this feature:
https://discord.com/channels/869392257814519848/1434188637389717556/1434188637389717556
I added a scrollbar setting called `completion_menu_scrollbar` to the
completion menu and defaulted it to "Never" to match past behavior.
Release Notes:
- editor: Add `editor.completion_menu_scrollbar` setting to show a
scrollbar in the completion menu
Anthony Eid
created
c2b3e60
settings: Change "remove trailing whitespace on save" to default false for Markdown (#41658)
Click to expand commit body
Closes #ISSUE: reported on X by user.
Release Notes:
- Made it so that the default value for the "remove trailing whitespace
on save" setting in Markdown is false, to fix cases where the removed
trailing whitespace had syntactic meaning
8217e57
ci: Enable namespace caching for Linux workers (#41652)
Click to expand commit body
Release Notes:
- N/A
Piotr Osiewicz
created
08daedd
editor: Add support for no scroll margin in full mode (#41838)
Click to expand commit body
Noticed this whilst testing the Docker debugger. I randomly scrolled the
console off screen and was confused briefly as to why this was the case.
Release Notes:
- The debugger query console will no longer needlessly overscroll.
Finn Evers
created
4da5675
Re-use the existing bundle steps for nightly too (#41699)
Click to expand commit body
One of the reasons we didn't spot that we were missing the telemetry env
vars for the production builds was that nightly (which was working) had
its own set of build steps. This re-uses those and pushes the env vars
down from the workflow to the job.
It also fixes nightly releases to upload all-in-one go so that all
platforms update in sync.
Closes #41655
Release Notes:
- N/A
Conrad Irwin
created
5fc5498
Revert "sum_tree: Replace rayon with futures (#41586) (#41846)
Click to expand commit body
This causes the background executor to hang
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Lukas Wirth
created
cb5055a
agent_ui: Fix expand message editor button not always working (#41845)
Click to expand commit body
The button could not be clicked whenever the editor was currently not
focused. This PR fixes this and also registers the action on a more
global level, similar to how this is done for all the other agent
actions.
Release Notes:
- Fixed an issue where the `Expand message editor` button would not work
in agent threads if the message editor was not focused.
Finn Evers
created
454d649
docs: Mark macOS 26.x as being supported (#41777)
Click to expand commit body
Add "Tahoe" to list of supported macOS versions.
Closes #ISSUE
Release Notes:
- N/A
warrenjokinen
created
222767e
ruby: Disable Ruby LSP for ERB files (#41754)
Click to expand commit body
The Ruby extension uses the `solargraph`
language server by default for Ruby files.
However, when a user opens any ERB file,
the extension automatically starts the Ruby LSP.
This affects developers because
they do not expect the Ruby LSP to be running.
Closes https://github.com/zed-extensions/ruby/issues/172
Release Notes:
- N/A
Vitaly Slobodin
created
d7b7fa3
agent: Add XML escaping for TextThreadContext title attribute (#39734)
Click to expand commit body
Escape special characters (&, <, >, ", ') in the title attribute of
TextThreadContext's XML output to prevent malformed XML when titles
contain these characters.
Resolves TODO at context.rs:629
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Xiaobo Liu
and
Bennet Bo Fenner
created
7cfce60
project_search: Add button to collapse/expand all excerpts (#41654)
Click to expand commit body
<img width="500" height="834" alt="Screenshot 2025-11-03 at 12 59@2x"
src="https://github.com/user-attachments/assets/15c5e1fc-2291-41b4-9eec-a8cfa5a446c7"
/>
Releases Note:
- Added a button that allows to expand/collapse all project search
excerpts at once.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
71f1f37
windows: Remove null terminator from keyboard ID (#41785)
Click to expand commit body
Closes #41486, closes #35862
It is unnecessary, and it broke the `uses_altgr` function.
Also add Slovenian layout as using AltGr.
This should fix:
-
https://github.com/zed-industries/zed/pull/40536#issuecomment-3477121224
- https://github.com/zed-industries/zed/issues/41486
- https://github.com/zed-industries/zed/issues/35862
As the current strategy relies on manually adding layouts that have
AltGr, it's brittle and not very elegant. It also has other issues (it
requests the current layout on every kesytroke and mouse movement).
**A potentially better and more comprehensive solution is at
https://github.com/zed-industries/zed/pull/41259**
This is just to fix the immediate issues while that gets reviewed.
Release Notes:
- windows: Fix AltGr handling on non-US layouts again.
Antal Szabó
created
8b560cd
Fix bug with uninstalled agent extensions (#41836)
Click to expand commit body
Previously, uninstalled agent extensions didn't immediately disappear
from the menu. Now, they do!
Release Notes:
- N/A
Richard Feldman
created
38e1e3f
project: Use user configured shells for project env fetching (#41288)
a6b177d
Update open buffers with newly registered completion trigger characters (#41243)
Click to expand commit body
Closes https://github.com/zed-extensions/java/issues/108
Previously, when language servers dynamically register completion
capabilities with trigger characters for completions (hello JDTLS), this
would not get updated in buffers for that language server that were
already open. This change is to find open buffers for the language
server and update the trigger characters in each of them when the new
capability is being registered.
Release Notes:
- N/A
Karl-Erik Enkelmann
created
73366be
diagnostics: Live update diagnostics view on edits while focused (#41829)
Click to expand commit body
Prior we were only updating the diagnostics pane when it is either
unfocued, saved or when a disk based diagnostic run finishes (aka cargo
check). The reason for this is simple, we do not want to take away the
excerpt under the users cursor while they are typing if they manage to
fix the diagnostic. Additionally we need to prevent dropping the changed
buffer before it is saved.
Delaying updates was a simple way to work around these kind of issues,
but comes at a huge annoyance that the diagnostics pane is not actually
reflecting the current state of the world but some snapshot of it
instead making it less than ideal to work within it for languages that
do not leverage disk based diagnostics (that is not rust-analyzer, and
even for rust-analyzer its annoying).
This PR changes this. We now always live update the view but take care
to retain unsaved buffers as well as buffers that contain a cursor in
them (as well as some other "checkpoint" properties).
Release Notes:
- Improved diagnostics pane to live update when editing within its
editor
Lukas Wirth
created
48bd253
Adds instructions on how to use Perf & Flamegraph without debug symbols (#41831)
Click to expand commit body
Release Notes:
- N/A
David Kleingeld
created
2131d88
Add `center_on_match` option for search (#40523)
Click to expand commit body
[Closes discussion
#28943](https://github.com/zed-industries/zed/discussions/28943)
Release Notes:
- Added `center_on_match` option to center matched text in view during buffer or project search.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Bob Mannino
and
Smit Barmase
created
42149df
Show modal hover for one-off tasks (#41824)
Click to expand commit body
Before, one-off commands did not show anything on hover at all, now they
show their command:
<img width="657" height="527" alt="after"
src="https://github.com/user-attachments/assets/d43292ca-9101-4a6a-b689-828277e8cfeb"
/>
Release Notes:
- Show modal hover for one-off tasks
Kirill Bulatov
created
379bdb2
languages: Add ignore keyword for gomod (#41520)
Click to expand commit body
go 1.25 introduce ignore directive in go.mod to specify directories the
go command should ignore.
ref: https://tip.golang.org/doc/go1.25#go-command
Release Notes:
- Added syntax highlighting support for the new [`ignore`
directive](https://tip.golang.org/doc/go1.25#go-command) in `go.mod`
files
Bing Wang
created
04e53bf
Move @punctuation.delimiter before @operator capture (#41663)
Click to expand commit body
Closes #41593
From what I understand the order of captures inside tree-sitter query
files matters, and the last capture will win. `?` and `:` are captured
by both `@operator` and `@punctuation.delimiter`.So in order for the
ternary operator to win it should live after `@punctuation.delimiter`.
Before:
<img width="298" height="32" alt="Screenshot 2025-10-31 at 17 41 21"
src="https://github.com/user-attachments/assets/af376e52-88be-4f62-9e2b-a106731f8145"
/>
After:
<img width="303" height="39" alt="Screenshot 2025-10-31 at 17 41 33"
src="https://github.com/user-attachments/assets/9a754ae9-0521-4c70-9adb-90a562404ce8"
/>
Release Notes:
- Fixed an issue where the ternary operator symbols in TypeScript would
not be highlighted as operators.
Follow-up of https://github.com/zed-industries/zed/pull/40183
Release Notes:
- (Preview only) Fixed inlay hints duplicating when multiple editors are
open for the same buffer
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Kirill Bulatov
and
Lukas Wirth
created
f8b414c
zed: Reduce number of rayon threads, spawn with bigger stacks (#41812)
Click to expand commit body
We already do this for the cli and remote server but forgot to do so for
the main binary
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Lukas Wirth
created
5050479
file_finder: Fix highlighting panic in open path prompt (#41808)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/41249
Couldn't quite come up with a test case here but verified it works.
Release Notes:
- Fixed a panic in file finder when deleting characters
Lukas Wirth
created
b625263
remote: Close window when SSH connection fails (#41782)
Click to expand commit body
## Context
This PR closes issue https://github.com/zed-industries/zed/issues/41781
It essentially `matches` the result of opening the connection here
https://github.com/zed-industries/zed/blob/f7153bbe8a869d0e2b25efed64fd7e4217899b63/crates/recent_projects/src/remote_connections.rs#L650
and adds a Close / Retry alert that upon 'Close' closes the new window
if the result is an error