Release Notes:
- Show invisibles in the editor
Relands #19298
Trying to quantify a performance impact, it doesn't seem to impact much
visible in Instruments or in a micro-benchmark of Editor#layout_lines.
We're still taking a few hundred micro-seconds (+/- a lot) every time.
The ascii file has just ascii, where as the cc file has one control
character per line.
<img width="1055" alt="Screenshot 2024-10-28 at 12 14 53"
src="https://github.com/user-attachments/assets/1c382063-bb19-4e92-bbba-ed5e7c02309f">
<img width="1020" alt="Screenshot 2024-10-28 at 12 15 07"
src="https://github.com/user-attachments/assets/1789f65e-5f83-4c32-be47-7748c62c3703">
Conrad Irwin
created
85ff03c
Add more context to the save new file path picker (#19863)
93b2000
Add support for Doxygen doc comments in C++ (#19858)
Click to expand commit body
This PR adds support for Doxygen-style doc comments in C++.
<img width="962" alt="Screenshot 2024-10-28 at 5 38 34 PM"
src="https://github.com/user-attachments/assets/57d0fa4b-07c1-4b71-899a-fba78e822e8f">
https://www.doxygen.nl/manual/docblocks.html
Closes https://github.com/zed-industries/zed/issues/18361.
Release Notes:
- C++: Added support for Doxygen-style doc comments starting with `/// `
or `//! `.
Marshall Bowers
created
188a893
python: Enhance syntax highlighting for type hints (#18185)
Click to expand commit body
Release Notes:
- Python: Improved syntax highlighting for type hints.
# Before

# After

---
Why manual recursion?
- Due to tree-sitter grammar not supporting recursion in query
(https://github.com/tree-sitter-grammars/tree-sitter-lua/issues/24),
currently only manual recursion is possible (refer to
https://github.com/projekt0n/github-nvim-theme/pull/250/files).
<br/>
Unable to highlight when simple structures appear before complex
structures, example:
```python
def t() -> str | dict[int, dict[int, dict[int, str]]]:
pass
```
Because complex structures are parsed as `subscript` rather than
`generic_type` by tree-sitter in this case ☹
<br/>
Related:
- https://github.com/zed-industries/zed/issues/14715
- [Union Type (Python
Doc)](https://docs.python.org/3/library/stdtypes.html#union-type)
- [Type parameter lists (Python
Doc)](https://docs.python.org/3/reference/compound_stmts.html#type-parameter-lists)
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
ClanEver
and
Marshall Bowers
created
052b746
language_selector: Fix debug_assert firing off on context menu creation for LSP view (#19854)
Click to expand commit body
Closes #ISSUE
Release Notes:
- N/A
Piotr Osiewicz
created
80f8905
Fix mouse clicks on remote-open-folder UI (#19851)
Click to expand commit body
Also change Zed's standard style to use
`.track_focus(&self.focus_handle(cx))`, instead of
`.track_focus(&self.focus_handle)`, to catch these kinds of errors more
easily in the future.
Release Notes:
- N/A
---------
Co-authored-by: Conrad <conrad@zed.dev>
Mikayla Maki
and
Conrad
created
826d83e
Fix backtrace spam on remote server (#19850)
Just spotted a tiny error that was causing us to continue looking for
nested folds 1 layer deeper than any fold already found at the target
level. We shouldn't continue to seek for a deeper fold after the fold at
the target level is found.
Tested on a debug build and used `editor.rs` as the source material:
```
Old
Level 1 fold:
[crates/editor/src/editor.rs:10777:9] counter = 2806
[crates/editor/src/editor.rs:10778:9] time_elapsed = 320.570792ms
Level 2 fold:
[crates/editor/src/editor.rs:10777:9] counter = 5615
[crates/editor/src/editor.rs:10778:9] time_elapsed = 497.4305ms
Level 3 fold:
[crates/editor/src/editor.rs:10777:9] counter = 7528
[crates/editor/src/editor.rs:10778:9] time_elapsed = 619.818334ms
New
Level 1 fold:
[crates/editor/src/editor.rs:10776:9] counter = 543
[crates/editor/src/editor.rs:10777:9] time_elapsed = 139.115625ms
Level 2 fold:
[crates/editor/src/editor.rs:10776:9] counter = 2806
[crates/editor/src/editor.rs:10777:9] time_elapsed = 312.560416ms
Level 3 fold:
[crates/editor/src/editor.rs:10776:9] counter = 5615
[crates/editor/src/editor.rs:10777:9] time_elapsed = 498.873292ms
```
Release Notes:
- N/A
Joseph T. Lyons
created
fab2f22
remote project: Fix project reference leak when waiting for prompt reply (#19838)
Click to expand commit body
When the language server gave us a prompt and we'd close the window, we
wouldn't release the `project` until the next `flush_effects` call that
came in when opening a window.
With this change, we no longer hold a strong reference to the project in
the future. Fixes the leak and makes sure we clean up the SSH connection
when closing a window.
Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
Thorsten Ball
and
Bennet
created
a451bcc
collab: Exempt staff from LLM usage limits (#19836)
Click to expand commit body
This PR updates the usage limit check to exempt Zed staff members from
usage limits.
We previously had some affordances for the rate limits, but hadn't yet
updated it for the usage-based billing.
Release Notes:
- N/A
This PR bumps the Dart extension to v0.1.2.
Changes:
- https://github.com/zed-industries/zed/pull/19592
Release Notes:
- N/A
Marshall Bowers
created
cc81f19
remote server: Fix error log about inability to open buffer (#19824)
Click to expand commit body
Turns out that we used client-side `fs` to check whether something is a
directory or not, which obviously doesn't work with SSH projects.
Release Notes:
- N/A
---------
Co-authored-by: Bennet <bennet@zed.dev>
Thorsten Ball
and
Bennet
created
5e89fba
dart: Add support for documentation comments (#19592)
Click to expand commit body
Closes #19590
Release Notes:
- N/A
---
I'm unable to test this because rebuilding Zed with the changes does not
seem to use the changes. If maintainers could let me know how to test
these changes I'd like to verify that this really fixes #19590.
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
We display the errors in another window anyway and if the connection
takes a while it looks like a bug that the modal stays open.
Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
Thorsten Ball
and
Bennet
created
e0ea9a9
Remove leftover comments from previous PR (#19820)
Click to expand commit body
Co-Authored-by: Thorsten <thorsten@zed.dev>
Removes some leftover comments from #19766
Release Notes:
- N/A
Co-authored-by: Thorsten <thorsten@zed.dev>
Bennet Bo Fenner
and
Thorsten
created
ff29a34
zig: Account for doctests in outline (#19776)
Click to expand commit body
zig has a feature called
[doctests](https://ziglang.org/documentation/master/#Doctests) where
instead of providing a string as the name of a test you use an
identifier so that the test is "tied" to it and can be used in
documentation. this wasnt accounted for so any tests using this were
unnamed in the outline
Release Notes:
- N/A
xdBronch
created
6686f66
ollama: Ensure only single task fetches models (#19830)
Click to expand commit body
Before this change, we'd see a ton of requests from the Ollama provider
trying to fetch models:
```
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: https://api.zed.dev/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
```
Turns out we'd send a request on *every* change to settings.
Now, with this change, we only send a single request.
Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
This PR depends on #19547
This PR adds support for tools from context servers. Context servers are
free to expose tools that Zed can pass to models. When called by the
model, Zed forwards the request to context servers. This allows for some
interesting techniques. Context servers can easily expose tools such as
querying local databases, reading or writing local files, reading
resources over authenticated APIs (e.g. kubernetes, asana, etc).
This is currently experimental.
Things to discuss
* I want to still add a confirm dialog asking people if a server is
allows to use the tool. Should do this or just use the tool and assume
trustworthyness of context servers?
* Can we add tool use behind a local setting flag?
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR adds support for selecting toolchains for a given language (e.g.
Rust toolchains or Python virtual environments) with support for SSH
projects provided out of the box. For Python we piggy-back off of
[PET](https://github.com/microsoft/python-environment-tools), a library
maintained by Microsoft.
Closes #16421
Closes #7646
Release Notes:
- Added toolchain selector to the status bar (with initial support for
Python virtual environments)
Piotr Osiewicz
created
03bd954
docs: Add diagram to remote development docs (#19827)
Click to expand commit body
Release Notes:
- N/A
Thorsten Ball
created
177dfdf
Declare RUSTFLAGS env var for all CI jobs (#19826)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/19149
Makes RUSTFLAGS propagation uniform, to ensure all `cargo ...` jobs get
the same RUSTFLAGS env set.
Release Notes:
- N/A
Kirill Bulatov
created
2ab0b3b
remote server: Fix language servers not starting (#19821)
Click to expand commit body
PR #19653 change the code in this diff, which lead to the remote_server
binary trying to load language grammars, which in turn failed, and
stopped languages from being loaded correctly.
That then lead to language servers not starting up.
This change reintroduces what #19653 removed, so that we don't load the
grammar on the remote_server, by ignoring the grammar name from the
config. The tests still all work.
Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
b139407
markdown preview: Ignore inline HTML tags in text (#19804)
Click to expand commit body
Follow up to #19785
This PR ensures that we explicitly ignore inline HTML tags so that we
can still extract the text between the tags and show them to the user
Release Notes:
- N/A
Bennet Bo Fenner
created
db61711
ci: Don't run GitHub Actions workflows on forks (#19789)
Closes https://github.com/zed-industries/zed/issues/19637
Follow-up of https://github.com/zed-industries/zed/pull/18927 , restores
the condition that removed the horizontal scrollbar when panel's items
are not long enough.
Release Notes:
- Fixed horizontal scrollbar not being hidden
([#19637](https://github.com/zed-industries/zed/issues/19637))
Kirill Bulatov
created
03a1c8d
markdown preview: Fix infinite loop in parser when parsing list items (#19785)
Click to expand commit body
Release Notes:
- Fixed an issue with the markdown parser when opening a markdown
preview file that contained HTML tags inside a list item
fc8a72c
WIP: ssh remoting: Add `upload_binary` field to SshConnections (#19748)
Click to expand commit body
This removes the old `remote_server { "download_binary_on_host": bool }`
field and replaces it with a `upload_binary: bool` on every
`ssh_connection`.
@ConradIrwin it compiles, it connects, but I haven't tested it really
yet
Release Notes:
- N/A
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Thorsten Ball
,
Conrad
, and
Conrad Irwin
created
1acebb3
Remove another false-positive Danger message (#19769)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/19151
Ignores any URLs aftrer `Release Notes:` (if present) and after
`Follow-up of` and `Part of` words.
Release Notes:
- N/A
Kirill Bulatov
created
78ed0c9
vim: Copy comment to new lines with o/O (#19766)
Click to expand commit body
Co-Authored-By: Kurt Wolf <kurtwolfbuilds@gmail.com>
Closes: #4691
Closes #ISSUE
Release Notes:
- vim: o/O now respect `extend_comment_on_newline`
Closes #19372
Release Notes:
- Fixed autoclosing quotes when the string is already open.
- Added autoclosing of rust multiline strings
---------
Co-authored-by: Kurt Wolf <kurtwolfbuilds@gmail.com>
Conrad Irwin
and
Kurt Wolf
created
4325819
Fix more failure cases of assistant edits (#19653)
Click to expand commit body
* Make `description` optional (since we describe it as optional in the
prompt, and we're currently not showing it)
* Fix fuzzy location bug that neglected the cost of deleting prefixes of
the query.
* Make auto-indent work for single-line edits. Previously, auto-indent
would not occur when overwriting a single line (without inserting or
deleting a newline)
Release Notes:
- N/A
Max Brunsfeld
created
c19c89e
collab: Include `checkout_complete` query parameter after checking out (#19763)
Click to expand commit body
This PR updates the checkout flow to include the `?checkout_complete=1`
query parameter after successfully checking out.
We'll use this on the account page to adapt the UI accordingly.
Release Notes:
- N/A
Marshall Bowers
created
507929c
Add `editor: fold at level <level>` commands (#19750)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/5142
Note that I only moved the cursor to the top of the file so it wouldn't
jump - the commands work no matter where you are in the file.
https://github.com/user-attachments/assets/78c74ca6-5c17-477c-b5d1-97c5665e44b0
Also, is VS Code doing this right thing here? or is it busted?
https://github.com/user-attachments/assets/8c503b50-9671-4221-b9f8-1e692fe8cd9a
Release Notes:
- Added `editor: fold at level <level>` commands. macOS: `cmd-k,
cmd-<number>`, Linux: `ctrl-k, ctrl-<number>`.
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Joseph T. Lyons
and
Piotr Osiewicz
created
7d0a7af
Fix condition for re-using highlights when seeking buffer chunks iterator (#19760)
Click to expand commit body
Fixes a syntax highlighting regression introduced in
https://github.com/zed-industries/zed/pull/19531, which caused syntax
highlighting to be missing after any block.
Release Notes:
- N/A
Max Brunsfeld
created
92ba183
Properly deserialize active pane in the workspace (#19744)
Click to expand commit body
Without setting the active pane metadata, no center pane events are
emitted on start before the pane is focused manually, which breaks
deserialization of other components like outline panel, which should
show the active pane's active item outlines on start.
Release Notes:
- N/A
Co-authored-by: Thorsten Ball <thorsten@zed.dev>
Kirill Bulatov
and
Thorsten Ball
created
6de5ace
Update outline panel representation when a theme is changed (#19747)
Click to expand commit body
Release Notes:
- N/A
Kirill Bulatov
created
c9db1b9
Add keybindings for accepting hunks (#19749)
Click to expand commit body
I went with Cmd-Shift-Y on macOS (Ctrl-Shift-Y on Linux) for "yes accept
this individual hunk" - both are currently unused.
I went with Cmd-Shift-A on macOS (Ctrl-Alt-A on Linux) for "accept all
hunks" - both are unused. (Ctrl-Shift-A on Linux was taken, as is
Ctrl-Alt-Y, so although the pairing of Ctrl-Shift-Y and Ctrl-Alt-A isn't
necessarily obvious, the letters seem intuitive - "yes" and "all" - and
those key combinations don't conflict with anything.)
Release Notes:
- Added keybindings for applying hunks in Proposed Changes
<img width="247" alt="Screenshot 2024-10-25 at 12 47 00 PM"
src="https://github.com/user-attachments/assets/d6355621-ba80-4ee2-8918-b7239a4d29be">
Richard Feldman
created
24cb694
Update placeholder text with key bindings to focus context panel and navigate history (#19447)
Click to expand commit body
Hopefully, this will help people understand how easy it is to add
context to an inline transformation.

@as-cii @maxdeviant @rtfeldman could somebody update this to display the
actual correct key bindings and ship it. I have them hard coded for now.
Release Notes:
- Updated placeholder text with key bindings to focus context panel and
navigate history.
---------
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Nathan Sobo
and
Richard Feldman
created
85bdd93
Revert "Show invisibles in editor (#19298)" (#19752)
Click to expand commit body
Closes: #19714
This reverts commit 6dcec47235fa85f0e416b9230e2fedc61de510ee.
Release Notes:
- (preview only) Fixes a crash when rendering invisibles