74241d9
Add woff(2) to file type icon list (#10833)
Click to expand commit body
I noticed the sidebar was using the fallback icons for woff/woff2
webfont files, instead of the font icon:
<img width="195" alt="CleanShot 2024-04-22 at 03 01 18@2x"
src="https://github.com/zed-industries/zed/assets/5074763/2e925c33-0be5-4ed9-ae87-ce72f95f8416">
With this PR, I'm hoping all those font files would use the A icon
instead.
Release Notes:
- Updated`.woff` & `.woff2` file types in the sidebar to display the
font icon.
Lachlan Campbell
created
dd41c10
Filter out other languages' tasks from the task modal (#10839)
Click to expand commit body
Release Notes:
- Fixed tasks modal showing history from languages, not matching the
currently active buffer's one
Kirill Bulatov
created
a0fa8a4
ruby: Check if `solargraph` exists in `$PATH` or is configured (#10835)
Click to expand commit body
This fixes #9811 by checking for the `solargraph` binary in the `$PATH`
as it's setup in the project shell.
It also adds support for configuring the path to `solargraph` manually:
```json
{
"lsp": {
"solargraph": {
"binary": {
"path": "/Users/thorstenball/bin/solargraph",
"arguments": ["stdio"]
}
}
}
}
```
## Example
Given the following setup:
- `ruby@3.3.0` used globally, no `solargraph` installed globally
- `ruby@3.2.2` used in a project, `solargraph` installed as binstub in
`$project/bin/solargraph`, `.envrc` to configure `direnv` to add
`$project/bin` to `$PATH
Which looks like this in practice:
```shell
# GLOBAL
~ $ ruby --version
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
~ $ which solargraph
solargraph not found
# IN PROJECT
~ $ cd work/projs/rails-proj
direnv: loading ~/work/projs/rails-proj/.envrc
direnv: export ~PATH
~/work/projs/rails-proj $ ruby --version
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23]
~/work/projs/rails-proj $ which solargraph
/Users/thorstenball/work/projs/rails-proj/bin/solargraph
```
The expectation is that Zed, when opening `~/work/projs/rails-proj`,
picks up the local `solargraph`.
But with **Zed Stable** that doesn't work, as we can see in the logs:
```
2024-04-22T10:21:37+02:00 [INFO] starting language server. binary path: "solargraph", working directory: "/Users/thorstenball/work/projs/rails-proj", args: ["stdio"]
2024-04-22T10:21:37+02:00 [ERROR] failed to start language server "solargraph": No such file or directory (os error 2)
```
With the change in this PR, it uses `rails/proj/bin/solargraph`:
```
[2024-04-22T10:33:06+02:00 INFO language] found user-installed language server for Ruby. path: "/Users/thorstenball/work/projs/rails-proj/bin/solargraph", arguments: ["stdio"]
[2024-04-22T10:33:06+02:00 INFO lsp] starting language server. binary path: "/Users/thorstenball/work/projs/rails-proj/bin/solargraph", working directory: "/Users/thorstenball/work/projs/rails-proj", args: ["stdio"]
```
**NOTE**: depending on whether `mise` (or `rbenv`, `asdf`, `chruby`,
...) or `direnv` come first in the shell-rc file, it picks one or the
other, depending on what puts itself first in `$PATH`.
## Release Notes
Release Notes:
- Added support for finding the Ruby language server `solargraph` in the
user's `$PATH` as it is when `cd`ing into a project's directory.
([#9811](https://github.com/zed-industries/zed/issues/9811))
- Added support for configuring the `path` and `arguments` for
`solargraph` language server manually. Example from settings: `{"lsp":
{"solargraph": {"binary":
{"path":"/Users/thorstenball/bin/solargraph","arguments": ["stdio"]}}}}`
([#9811](https://github.com/zed-industries/zed/issues/9811))
Thorsten Ball
created
e1685de
Revert "Use XI2 for Scrolling on X11" (#10818)
Click to expand commit body
Reverts zed-industries/zed#10695
Some users are experiencing broken scrolling due to the changes from
this PR, so it should be reverted while I investigate what causes the
problems.
Release Notes:
- N/A
Owen Law
created
4ab48c6
storybook: Fix crash in Picker story (#10793)
Click to expand commit body
@mikayla-maki approved my suggested change as noted in the issue
below...
Release Notes:
- Fixed: [#10739 ](https://github.com/zed-industries/zed/issues/10739)
cd6acff
Remove TODOs from semantic index build-up (#10789)
Click to expand commit body
Quick touch up of some `// todo!()` that got left in `semantic-index`
Release Notes:
- N/A
Kyle Kelley
created
5102e37
Changed cmd+w with no open tabs to close window (#10740)
Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/5322
Release Notes:
- Changed cmd+w with no open tabs to close window
[#5322](https://github.com/zed-industries/zed/issues/5322)
https://github.com/zed-industries/zed/assets/22855292/113b1635-ae30-4718-a3d3-758a4bf53714
William Viktorsson
created
fee2065
windows: Fix main thread blocking when resizing or moving window (#10758)
I accidentally wrote the bitmap format incorrectly during a refactor.
Release Notes:
- N/A
张小白
created
8a02159
Add a command to expand the context for a multibuffer (#10300)
Click to expand commit body
This PR adds an action to expand the excerpts lines of context in a
multibuffer.
Release Notes:
- Added an `editor::ExpandExcerpts` action (bound to `shift-enter` by
default), which can expand the excerpt the cursor is currently in by 3
lines. You can customize the number of lines by rebinding this action
like so:
```json5
// In your keybindings array...
{
"context": "Editor && mode == full",
"bindings": {
"shift-enter": ["editor::ExpandExcerpts", { "lines": 5 }],
}
}
```
---------
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Max <max@zed.dev>
Editor scrollbar has several issues that show up on large files:
- The thumb scrolls beyond the window.
- When dragged, the thumb goes out of sync with the mouse pointer.
- When the scrollbar trunk is clicked, the thumb jumps incorrectly.
https://github.com/zed-industries/zed/assets/2101250/320dba59-a526-4e68-99b3-1186271ba839
The reason is that the scrollbar now has two modes:
1. The "basic mode" for small files, when the thumb height correctly
represents the visible area, i.e. the top of the thumb matches the top
visible row (let's call it top-to-top sync), and the bottom of the thumb
matches the bottom visible row.
2. The "extended mode" for large files, when thumb becomes too small and
we have to impose minimal height to it. In this mode we have a vertical
offset of the first row position inside the scrollbar, we try to
position the thumb center-to-center with the editor.
...and the second mode is not implemented correctly. Also, mouse event
handlers ignore it. It is possible to fix this implementation, but I'm
not sure if it worth doing because it a) leads to some confusing cases
(for instance, in the extended mode the first row marker is not at the
top of the scrollbar), and b) differs from what all other editors do.
Here's a previous mentioning of this problem:
https://github.com/zed-industries/zed/pull/9080#pullrequestreview-1927465293
This PR changes the "extended mode", making it synchronize the thumb
top-to-top with the editor. It solves all the mentioned problems and
makes the scroll thumb work the same whay as in other editors.
But if you want to stick to the idea of the center-to-center sync for
large files, I can do that too.
Release Notes:
- Fixed scroll thumb behaviour.
Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.
- N/A
Andrew Lygin
created
247b031
Add bracket queries for HCL, Terraform (#10785)
Click to expand commit body
Release Notes:
- N/A
Max Brunsfeld
created
f082344
Add pull requests to git blame tooltip (#10784)
Click to expand commit body
Release Notes:
- Added links to GitHub pull requests to the git blame tooltips, if they
are available.
Screenshot:
(Yes, the icon will be resized! cc @iamnbutler)

Thorsten Ball
created
70427da
Remove unused field on CommitDetails (#10783)
Click to expand commit body
Release Notes:
- N/A
Thorsten Ball
created
13c1726
Properly pass nested script arguments for tasks (#10776)
Click to expand commit body
Closes
https://github.com/zed-industries/zed/discussions/10732#discussion-6524347
introduced by https://github.com/zed-industries/zed/pull/10548 while
keeping both Python and Bash run selection capabilities.
Also replaced redundant `SpawnTask` struct with `SpawnInTerminal` that
has identical fields.
Release Notes:
- Fixed incorrect task escaping of nested script arguments
---------
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Kirill Bulatov
and
Piotr Osiewicz
created
9247da7
git blame: Display GitHub avatars in blame tooltips, if available (#10767)
Click to expand commit body
Release Notes:
- Added GitHub avatars to tooltips that appear when hovering over a `git
blame` entry (either inline or in the blame gutter).
Demo:
https://github.com/zed-industries/zed/assets/1185253/295c5aee-3a4e-46aa-812d-495439d8840d
Thorsten Ball
created
37e4f83
Fix stutter while dragging something over an element that stops event propagation (#10737)
Click to expand commit body
~~This is extracted from #10643.~~
~~It looks like the editor had a small optimization to drop events when
hovering the gutter. This also happens while dragging a tab over the
gutter, and causes some stuttering. Please correct me if this wasn't
just a small optimization, but I could not derive a different reason for
this code to exist.~~
The window was waiting for event propagation to update any drag. This
change makes sure the drag always gets updated, which makes sure it will
always be fluid, no matter if any element stops event propagation. Ty
@as-cii for pointing me to a better solution!
Release Notes:
- Fixed issue where dragging tab over any element that stops event
propagation would stutter
Philipp Schaffrath
created
3273f5e
fs: Move Repository trait into git crate (#10768)
Click to expand commit body
/cc @mrnugget
Release Notes:
- N/A
Piotr Osiewicz
created
8513a24
chore: Revert accidental pushes to main (#10769)
Click to expand commit body
This reverts two commits that I've just pushed to main instead of
`move-repository-trait-into-git`. Mea culpa.
Release Notes:
- N/A
Piotr Osiewicz
created
54699e3
fixup! fixup! Always provide default task context (#10764)
Piotr Osiewicz
created
8fc8309
fixup! Always provide default task context (#10764)
Piotr Osiewicz
created
222034c
Always provide default task context (#10764)
Click to expand commit body
Based on
https://github.com/zed-industries/zed/issues/8324?notification_referrer_id=NT_kwDOACkO1bI5NTk0NjM0NzkyOjI2OTA3NzM¬ifications_query=repo%3Azed-industries%2Fzed+is%3Aunread#issuecomment-2065551553
Release Notes:
- Fixed certain files' task modal not showing context-based tasks
Kirill Bulatov
created
9863b92
windows: Fix panic with some unicode characters (#10750)
Partially fixes https://github.com/zed-industries/zed/issues/10483 (X11
still has this issue)
Also adds some missing destroy() calls for some objects.
Thanks @phisch!
Release Notes:
- N/A
2602fc4
Match user selection when renaming (#10748)
Click to expand commit body
Initial state:
<img width="337" alt="Screenshot 2024-04-19 at 01 35 34"
src="https://github.com/zed-industries/zed/assets/2690773/1720d06c-54ed-4479-b694-ea478ac5a55a">
Before the fix:
<img width="319" alt="Screenshot 2024-04-19 at 01 35 39"
src="https://github.com/zed-industries/zed/assets/2690773/64429088-e75b-44c3-b5d4-31a841e69a1d">
After:
<img width="336" alt="Screenshot 2024-04-19 at 01 36 43"
src="https://github.com/zed-industries/zed/assets/2690773/c523e549-c546-4a70-aa33-629912598466">
Release Notes:
- Improved rename selections to match the user ones
Tooltip shows original task template's label, if it differs from the one
displayed in the modal. Also, a resolved command with args will be shown
in the tooltip if different from the modal entry text.
<img width="578" alt="Screenshot 2024-04-19 at 00 40 28"
src="https://github.com/zed-industries/zed/assets/2690773/c89369d6-8ffc-4464-ab3b-ea5e8fb7625a">
<img width="761" alt="Screenshot 2024-04-19 at 00 40 32"
src="https://github.com/zed-industries/zed/assets/2690773/b02f1518-976a-4a9b-ba7c-f88c6e056217">
<img width="738" alt="Screenshot 2024-04-19 at 00 40 56"
src="https://github.com/zed-industries/zed/assets/2690773/be502537-f4bd-4ae0-a5e7-78e37fe8fb00">
<img width="785" alt="Screenshot 2024-04-19 at 00 41 01"
src="https://github.com/zed-industries/zed/assets/2690773/9bedcd21-8729-44c8-9a17-46a5a01c7f26">
Release Notes:
- Added tooltips into task spawn modal
Kirill Bulatov
created
870a61d
Add "Open in Terminal" context menu entries for project panel, editor and tab context menus (#10741)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/4566
Pane tabs (does not exist for multibuffer tabs):
<img width="439" alt="Screenshot 2024-04-18 at 23 01 08"
src="https://github.com/zed-industries/zed/assets/2690773/3af79ed8-07ea-4cf2-bcf9-735b1b3be8c4">
Editor context menu:
<img width="404" alt="Screenshot 2024-04-18 at 23 01 14"
src="https://github.com/zed-industries/zed/assets/2690773/38ea7afc-df2b-45ef-8331-eb6a4588af9f">
Project panel context menu (was not shown for file entries before this):
<img width="408" alt="Screenshot 2024-04-18 at 23 01 18"
src="https://github.com/zed-industries/zed/assets/2690773/e336fce1-7da0-4671-b8d2-8d3409c23eb6">
Release Notes:
- (breaking change) Moved `project_panel::OpenInTerminal` into
`workspace::OpenInTerminal` action and add it in editors, tab context
menus and proper panel file entries
([4566](https://github.com/zed-industries/zed/issues/4566))
Kirill Bulatov
created
250b71f
Select buffer search query on follow-up cmd-f (#10745)
Click to expand commit body
https://github.com/zed-industries/zed/assets/2690773/fd754cfc-aca5-4c4d-9b42-53d1c8eca0e9
Unfortunately, the tests did not work for me, as the `FocusSearch`
action handlers were never called for me.
Release Notes:
- Improved buffer search workflow: follow-up cmd-f select query string
Kirill Bulatov
created
15c4c4a
wayland: Fix input_handler out of range access (#10724)
Click to expand commit body
The wayland implementation takes an input handler from the state, but
only puts it back if the event was an IME key. I flipped the logic to
ensure it's always put back.
This should fix both:
- #10344
- #10652
Release Notes:
- Fixed input_handler out of range access
([#10344](https://github.com/zed-industries/zed/issues/10344),
[#10652](https://github.com/zed-industries/zed/issues/10652)).
Changes the X11 platform code to use the xinput extension which allows
for smooth scrolling and horizontal scrolling.
Release Notes:
- Added smooth scrolling to X11 on Linux
- Added horizontal scrolling to X11 on Linux
Owen Law
created
bd5473a
docs: Install Windows 10/11 SDK with VS installation (#10550)
Click to expand commit body
This installation is also needed with VS installation. Only then they
would be able to target the WINDOWS SDK
Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.
I was getting link.exe error before this stating that my MSVC was not
installed properly. But MSVC was perfectly installed. I went on
stackoverflow and checked for similar instances with `cargo run` on
windows and found this
https://stackoverflow.com/a/55603112/12859779
where in comment Fasis states that we need to install WINDOWS 10 SDK. I
had Windos 11 so Installed that and it worked :)
Release Notes:
- N/A
Nimit Savant
created
1fbc041
Move `lints` section to the top of `Cargo.toml`, to match the others
This introduces multiple improvements to the drop targets.
## Hitbox shape
Currently, hitboxes are rectangles, where the vertical ones reach all
the way to the ends, which reduces the space for the horizontal ones,
making the hitboxes a bit awkward in the corners. This new approach just
determines the closest side.
Visual representation:

## Hitbox size
The width of the hitbox was currently always 8 rem all around. In setups
with many columns or rows, or when the font size was very large, this
could potentially overlap the center hitbox, not allowing to drop a tab
without another split. Now the width of the hitboxes are a fraction of
the smaller size of its parents width and height. This makes sure the
hitboxes have the same width all around, but never fully block the
center hitbox.
I've also made this value configurable through the new
`drop_target_size` config which takes a `f32` fraction and is set to 0.2
by default.
Not sure if this is worth mentioning, but this technically allows to
remove the split hitboxes all together by setting it to `0.0`, or
removing the center hitbox by setting it to any value `>=0.5`. Not that
this is necessary, but it would be possible now.
## Larger visualization
The visual overlay when using one of the side hitboxes were also `8em`
wide. Since their logical size now changed, and it can't currently be
represented with GPUI (without abusing the `canvas` element), I made the
visual feedback take half of the width or height of the available space,
just like how other editors do this.
Also, the opacity/alpha value set by a theme is currently ignored. This
change now respects the themes opacity for it!
## Respect alpha value
Currently, the alpha value of `drop_target.background` is ignored. Even
the default themes set a value that is overwritten by a hard coded
value. I have removed this hard coded value and it now respects the
alpha value.
This change affects existing themes, see
https://github.com/zed-industries/zed/pull/10643#issuecomment-2059641528
## ~~No more lag while dragging over gutter~~ Extracted into #10737
~~It looks like the editor had a small optimization to drop events when
hovering the gutter. This also happens while dragging a tab over the
gutter, and causes some stuttering. Please correct me if this wasn't
just a small optimization, but I could not derive a different reason for
this code to exist.~~
Here is a video that tries to show all those changes with a before on
the left, and the after on the right:
https://github.com/zed-industries/zed/assets/1282767/f97f3420-513f-410f-a1c8-7966429ad348
Release Notes:
- Added `drop_target_size` setting. This should be a fractional percent
(e.g., `0.5`).
- Improved the hitboxes for drop targets.
- Updated drop targets to respect the alpha channel of the
`drop_target.background` color.
To work properly, needs #10119 to be merged.
https://github.com/zed-industries/zed/assets/14981363/2bb0c51b-6c70-4b29-8baa-302fb4fb9e89
Release Notes:
- N/A
This PR brings `Direct Write` to Zed. Now, Zed first trys to query
dwrite interface, if not supported, which means runing on Windows below
win10 1703), will choose `cosmic` as a fallback text system.
This direct write text system supports:
- Full font features support
- Emoji support
- Default system fonts as fallback
### Font features
https://github.com/zed-industries/zed/assets/14981363/198eff88-47df-4bc8-a257-e3acf81fd61d
### Emoji

**Note: input emoji through IME or IMM not working yet, copy paste emoji
works fine (will be fixed by #10125 )**
### Font fallback
I use `Zed mono` which dose not support chinese chars to test font
fallback
https://github.com/zed-industries/zed/assets/14981363/c97d0847-0ac5-47e6-aa00-f3ce6d1e50a5
Release Notes:
- N/A
<img width="691" alt="image"
src="https://github.com/zed-industries/zed/assets/2588851/c5e02d12-d1e4-4407-971c-72de7e6599f0">
@mikayla-maki the extension lists you as the original author.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
jansol
and
Marshall Bowers
created
a202499
markdown preview: Update channel notes when other collaborator changes buffer (#10718)
Click to expand commit body
https://github.com/zed-industries/zed/assets/53836821/9a57885e-83b0-49fb-b3a8-0a7868566b85
Release Notes:
- Markdown preview now re-renders when another collaborator changes the
content of channel notes
Bennet Bo Fenner
created
c2428f9
git blame: Parse permalinks client side (#10714)
Click to expand commit body
Release Notes:
- N/A
Thorsten Ball
created
d5c5394
Open exactly one terminal on `workspace::NewTerminal` action (#10721)
Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/4567
Release Notes:
- Fixed multiple terminals being opened on `workspace::NewTerminal`
calls ([4567](https://github.com/zed-industries/zed/issues/4567))
Kirill Bulatov
created
bb97432
Add minimum column option to git inline blame (#10682)
Click to expand commit body
Release Notes:
- Added a setting to determine the minimum column where the inline blame
information is shown. Example: `{{"git": {"inline_blame": {"min_column":
80}}}` ([#10555](https://github.com/zed-industries/zed/issues/10555)).
Demo Video:
https://github.com/zed-industries/zed/assets/1185253/61343dbe-9002-4bd1-b0d4-403f8da79050
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Shreekar Halvi
and
Thorsten Ball
created
1b75f9d
Add a setting to show/hide the project panel button in the status bar (#10707)
Click to expand commit body
### What?
A setting has been added to control the visibility of the Project Panel
button in the status bar.
### Why?
I don't tend to use the Project Panel, but use a keyboard shortcut to
access if needed. Thus, the button in the status bar provides me little
more than visual clutter. Additionally, there is precedent for this
configurability with other panels (collaboration, chat, notification,
terminal, etc).
Release Notes:
- Added a setting to show/hide the Project Panel button in the status
bar. `{"project_panel": {"button": false}}`
David Baldwin
created
4c3178e
Have the CI server draft the release notes (#10700)
Click to expand commit body
While I don't expect these to be useful for our weekly minor releases, I
hope that this will save a step for people doing mid-week patches.
Release Notes:
- N/A
Conrad Irwin
created
41c8f2c
Attempt to fix segfault in window drop (#10690)
Click to expand commit body
By default NSWindow's release themselves when closed, which doesn't
interact well with rust's lifetime system.
Disable that behaviour, and explicitly release the NSWindow when the
window handle is dropped.
Release Notes:
- Fixed a (rare) panic when closing a window.
Conrad Irwin
created
b9e0269
project panel: do not expand collapsed worktrees on "collapse all entries" (#10687)