Give the inline file crease inside of `assistant2`'s editor a
selection background when there is a selection over it
Release Notes:
- N/A
---------
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Closes#25230
```
The shift- modifier can only be used in combination with a letter to indicate the uppercase version. For example shift-g matches typing G. Although on many keyboards shift is used to type punctuation characters like (, the keypress is not considered to be modified and so shift-( does not match.
```
[Document](https://zed.dev/docs/key-bindings#keybinding-syntax)
Release Notes:
- Fixed Keymap use `shift-` modifier symbol
Closes#24565
As pointed out in
https://github.com/zed-industries/zed/issues/24565#issuecomment-2657822723
, the name for the Pyright language server is `pyright-langserver`, not
`pyright`. The latter is a CLI-tool as described in
https://microsoft.github.io/pyright/#/command-line which only provides
static type checking. It has neither LSP-capabilities nor a `--stdio`
argument. Thus, the error as shown in the linked issue appears.
I disagree with the fix as described in
https://github.com/zed-industries/zed/issues/24565#issuecomment-2657904208
, as it could only cause this error to reappear in rare scenarios where
Pyright, but not the Pyright language server is installed in a user's
environment. Just checking for `pyright-langserver` to be present in the
environment seems more straightforward here.
Release Notes:
- Python: Fixed Pyright failing to start when installed locally
Co-authored-by: Beniamin Zagan <47153906+beniaminzagan@users.noreply.github.com>
Closes#24931
We've flipped back and forth at least once on whether the last or first
added keybinding should be shown in different contexts (See
[this](https://github.com/zed-industries/zed/issues/23621#issuecomment-2614061385)
as well as #23621 and the subsequent #23660)
This PR attempts to pick a side to stick with so that we are at least
consistent until #23660 is resolved and we have a way to determine which
keybinds to display in a manner that is both consistent and not
confusing
Release Notes:
- N/A
Closes#12064
It feels a bit strange to use `brackets` for this but it seems to work
without unintended consequences from my testing so far.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Closes #ISSUE
Release Notes:
- Rename `editor::RevertSelectedHunks` and `editor::RevertFile` to
`git::Restore` and `git::RestoreFile` for consistency with git
Closes https://github.com/zed-industries/zed/issues/10122
Closes https://github.com/zed-industries/zed/issues/25034
When formatting buffers or reloading them after they change on disk, we
performed a diff between the buffer's current contents and the new
content. We need this diff in order preserve the positions of cursors
and other decorations when updating the buffer's text.
In order to handle changes within lines, we would previously compute a
*character-wise* diff. This was extremely expensive for large files.
This PR gets rid of the character-wise diff, and instead performs a
normal line-wise diff. Then, for certain replace hunks, we compute a
secondary word-based diff. Also, I've switched to the
[`imara-diff`](https://github.com/pascalkuthe/imara-diff) crate, instead
of `similar`.
Release Notes:
- Fixed a hang that could occur when large files were changed on disk or
formatted.
I've seen that the Theme modal has a footer with 2 links: Theme Docs
(which links to Configuration > Themes) on the left, Install Themes on
the right. I've basically done the same to the Icon Theme modal -
however we seem to be missing a Configuration > Icon Themes doc, I've
basically checked how it was made for Themes and pretty much adapted for
Icon Themes. Maybe a better solution would be to combine both. Or add
Icon themes section under Themes.
I hope somebody from Zed can have a look and adapt this PR where needed.
<img width="553" alt="Screenshot 2025-02-19 at 6 37 20 PM"
src="https://github.com/user-attachments/assets/30602027-b7a7-4690-ba05-fc9eac313e67"
/>
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This PR fixes a comment in the `cli` crate that seems to have been
inadvertently changed in #25185.
I also reworded it to be a bit more formal.
Release Notes:
- N/A
Release Notes:
- Added an `on_last_window_closed` setting, that allows users to quit
the app when the last window is closed
---------
Co-authored-by: Richard <richard@zed.dev>
Release Notes:
- Added support for checking for `package-version-server` on the
`$PATH`.
---------
Signed-off-by: Matthew Penner <me@matthewp.io>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This PR adds a new `allow_rewrap` setting to control how
`editor::Rewrap` behaves for a given language.
This is a language setting, so it can either be configured globally or
within the context of an individual language.
For example:
```json
{
"allow_rewrap": "in_selections",
"languages": {
"Typst": {
"allow_rewrap": "anywhere"
}
}
}
```
There are three different values:
- `in_comment`: Only perform rewrapping within comments.
- `in_selections`: Only perform rewrapping within the current
selection(s).
- `anywhere`: Allow rewrapping anywhere.
The global default is `in_comment`, as it is the most conservative
option and allows rewrapping comments without risking breaking other
syntax.
The `Markdown` and `Plain Text` languages default to `anywhere`, which
mirrors the previous behavior for those language that was hard-coded
into the rewrap implementation.
This setting does not have any effect in Vim mode, as Vim mode already
allowed rewrapping anywhere.
Closes https://github.com/zed-industries/zed/issues/24242.
Release Notes:
- Added an `allow_rewrap` setting to control the `editor::Rewrap`
behavior for a given language.
The language::markdown crate had been superceded by markdown::Mardown.
After #25117, the only two remaining use-cases were rendering git commit
messages (which are arguably not really markdown) and the signature help
(which is definitely not markdown).
Updated the former to use the new markdown component, and the latter to
do syntax highlighting manually.
Release Notes:
- Allow selecting the commit message in git commits
Closes#22610
This PR fixes the invisible scroll thumb or very tiny scroll thumb when
viewing long or wide files.
The difference between `track_bounds` (imagine scrollbar total height)
and `thumb_size` is the remaining area, which maps to the total height
of the page for scrolling to work as expected. This is already accounted
for. That means we can adjust the thumb size as needed, and the
remaining height/width will be mapped correctly.
So, we can simply use define a minimum size for the thumb and handle
cases where the track bounds are smaller than the defined minimum size.
In such cases, the scrollbar will take up the full height/width of the
track bounds. This is handled mainly to avoid panics in extreme edge
cases. Practically, at such small heights/widths, users are unlikely to
attempt scrolling.
Before:
https://github.com/user-attachments/assets/cf2edf03-8b9a-4678-b3c6-9dcbd01e5db8
After:
https://github.com/user-attachments/assets/e9496a44-3e7d-4be7-b892-2762cccd9959
Release Notes:
- Fixed issue where scroll thumb was invisible or too small when viewing
long or wide files.
- Hides header when no active repo/no repo
- Entire commit editor now has i-beam cursor on hover
- Adds an icon to the project diff tab
Release Notes:
- N/A
This reverts commit 9ef0501853 due to a
panic.
```
{
"thread": "main",
"payload": "9 is not a valid char boundary in path \"crates/…/LiveKitBridge/\"",
"location_data": {
"file": "crates/file_finder/src/file_finder.rs",
"line": 646
}
}
```
Release Notes:
- N/A
Felt like this was relevant particularly as we're living with both
`trigger` and `trigger_with_tooltip`. At some point, I believe there
should be only one (`trigger_with_tooltip`) and that should be then
renamed to just `trigger` back again! We're supporting both for now just
for ease of migration/avoiding big changes.
Release Notes:
- N/A
When selecting text, it highlights all matching occurences along with
selected text itself. This causes highlight overlap, which looks bit
odd. This PR fixes it.
Bonus:
Context: We have an edge case (which we already cover) where we don’t
want to clear `SelectedTextHighlight` every time the selection changes.
This happens when you are dragging the selection across some word, if
you clear it directly on selection change, due to debounce wait, the
highlight take some time to appear, which causes flickering for the
user. We solve this by not clearing it directly but only clearing it
when a new selection is found. This avoids the flicker.
However, we also need to clear the selection even before the debounce
wait if we detect early on that the selection is different from previous
ones. Otherwise, the user will have to wait until the debounce time to
see it cleared on the screen.
The code for this is a little repetitive because we check the buffer
state both before and after the debounce. But this is necessary.
---
Before:
Notice overlapping corners and selected text is bit darker in this case.

After:

Release Notes:
- N/A
Closes#16951
Handle the case where you click on the terminal while pressing Shift.
Instead of setting a new selection head, we simply update the selection
to that point. This allows you to repeatedly extend the selection to new
points by pressing Shift while preserving the original selection head.
Preview:
Selection works in direct terminal, but doesn't on Vim like program,
which is expected.
https://github.com/user-attachments/assets/e46987d8-a9a3-495d-8dd9-98d461317a8d
Release Notes:
- Added ability to extend selection with Shift + click in the terminal.
Closes#18641
Contributes: #13194
Release Notes:
- Open LSP documentation file links in Zed not the system opener
- Render completion documentation markdown consistently with
documentation markdown
Closes#24951
We were highlighting both as `@variable.special` however, they are
_techinically_ keywords and other editors (VSCode/WebStorm) seem to
highlight them as keywords as well.
Release Notes:
- N/A