35c3af7
gpui/mac: Disable shadows on non-opaque windows (#10896)
Click to expand commit body
The culprit behind ghost images in transparent windows and bad
performance with blurred windows turns out to be one and the same:
window shadows. The simplest and most popular fix appears to be to
simply disable shadows on non-opaque windows so let's just do that.
Disabling shadows on a window that is already visible however leaves the
shadow on screen, detached from the window, until a full screen effect
such as exposé or a virtual desktop switch wipes it clean. There does
not seem to be any known solution to this, and it does not affect
windows created after switching to a transparent theme so this is a good
enough compromise for now.
Release Notes:
- Fixed ghostly artifacts in transparent window backgrounds.
- Fixed sluggishness with blurred window backgrounds.
jansol
created
5ef7591
git: Do not log error if repository has no commits (#11163)
Click to expand commit body
This is a follow-up to #10685 which started to hide these errors instead
of displaying them to the user.
But the errors are still noisy and not actionable, so we hide them
instead.
Release Notes:
- Removed error message being logged when `git blame` is run in a
repository without commits.
Co-authored-by: Bennet <bennetbo@gmx.de>
45d217f
Set destructive action only when prompt level is set to `Destructive` (#11154)
Click to expand commit body
Oversight from #11015, where we added `PromptLevel::Destructive`, which
should be used when a prompt performs a "destructive" action (e.g.
deleting a file). However, we accidentally set `setHasDestructiveAction`
to `true` regardless of which prompt level would be specified
Release Notes:
- N/A
Bennet Bo Fenner
created
ca187c8
Allow users to configure ESLint's `rulesCustomizations` settings (#11135)
Click to expand commit body
https://github.com/zed-industries/zed/assets/2072378/18f0bb28-0546-4234-a11f-39af6c9fcc12
`rulesCustomizations` is an array of rule severity overrides. Globs can
be used to apply default severities for multiple rules. See
[docs](https://github.com/microsoft/vscode-eslint/blob/553e632fb4cf073fce1549fb6c3c1b5140a52ebb/README.md?plain=1#L312-L333)
& [type
definitions](https://github.com/microsoft/vscode-eslint/blob/553e632fb4cf073fce1549fb6c3c1b5140a52ebb/%24shared/settings.ts#L168)
Example Zed `settings.json` to override all eslint errors to warnings:
```jsonc
{
"lsp": {
"eslint": {
"settings": {
"rulesCustomizations": [
// set all eslint errors/warnings to show as warnings
{ "rule": "*", "severity": "warn" }
]
}
}
}
}
```
Release Notes:
- Added support for configuring ESLint's `rulesCustomizations` settings,
ie. `{"lsp": {"eslint": {"settings": {"rulesCustomizations": [{"rule":
"*", "severity": "warn"}]}}}}`
William Villeneuve
created
f72cf2a
Highlight reference types directive in TypeScript (#11039)
### fix cropping problem
Prior to these changes the images were being cropped so you never
actually saw
the full image but you had to use your mouse to make the window bigger
to see
both the text and the images...
### activate
```rust
cx.activate(true);
```
was not in place so the window did not appear when you ran the example
### No longer need to Ctrl-c to quit the example
Now you can hit *Cmd-q* to quit out of the example instead of having to
*Ctrl-c* in your
terminal where you fired off the example
Release Notes:
- N/A
Fix missed delete in project panel
Fix blinking scrollbar from selections-in-scrollbar change
Release Notes:
- N/A (nightly only)
Mikayla Maki
created
39fb1d5
Incorporate ElementId as part of the Element::id trait method and expose GlobalId (#11101)
Click to expand commit body
We're planning to associate "selection sources" with global element ids
to allow arbitrary UI text to be selected in GPUI. Previously, global
ids were not exposed outside the framework and we entangled management
of the element id stack with element state access. This was more
acceptable when element state was the only place we used global element
ids, but now that we're planning to use them more places, it makes sense
to deal with element identity as a first-class part of the element
system. We now ensure that the stack of element ids which forms the
current global element id is correctly managed in every phase of element
layout and paint and make the global id available to each element
method. In a subsequent PR, we'll use the global element id as part of
implementing arbitrary selection for UI text.
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
This PR fixes some issues with the icons added in #11116, where they
weren't being registered properly.
Release Notes:
- N/A
Marshall Bowers
created
32e6424
Icons for js, c, cc, h, jsx, and tsx file types (#11116)
Click to expand commit body
Release Notes:
Add Icons for react (jsx/tsx), C, and C++ files

Release Notes:
- Added icons for JS, React, C, and C++
Derek Briggs
created
d2569af
Switch from delete file by default to trash file by default (#10875)
Click to expand commit body
TODO:
- [x] Don't immediately seg fault
- [x] Implement for directories
- [x] Add cmd-delete to remove files
- [ ] ~~Add setting for trash vs. delete~~ You can just use keybindings
to change the behavior.
fixes https://github.com/zed-industries/zed/issues/7228
fixes https://github.com/zed-industries/zed/issues/5094
Release Notes:
- Added a new `project_panel::Trash` action and changed the default
behavior for `backspace` and `delete` in the project panel to send a
file to the systems trash, instead of permanently deleting it
([#7228](https://github.com/zed-industries/zed/issues/7228),
[#5094](https://github.com/zed-industries/zed/issues/5094)). The
original behavior can be restored by adding the following section to
your keybindings:
```json5
[
// ...Other keybindings...
{
"context": "ProjectPanel",
"bindings": {
"backspace": "project_panel::Delete",
"delete": "project_panel::Delete",
}
}
]
Mikayla Maki
created
5dbd23f
vim: add keybinding to jump to parent directory in project panel (#11078)
Click to expand commit body
Release Notes:
- vim: Support `-` to go to `parent directory` of the project panel.
As mentioned in the comments of #11073 this adds support for netrw's `-`
to go to the parent directory in the project panel. Again tested on
linux only.
- N/A
How it looks:
https://github.com/zed-industries/zed/assets/2101250/f564111c-1019-4442-b8a6-de338e12b12e
This PR adds cursor markers to the scrollbar. They work similar to
VSCode:
1. A cursor marker takes the whole scrollbar width.
2. It's always 2px high.
3. It uses the player's `cursor` color, so it may be helpful in the
collaboration mode.
There's a setting to switch cursor markers on/off:
```json
{
"scrollbar": {
"cursors": true
}
}
```
Implementation details:
- Unlike other markers, cursor markers are displayed synchronously.
Otherwise they don't feel smooth and sometimes freez on prolonged
up/down navigation.
- Cursor markers are automatically switched off when it's more than 100
of them.
- The minimum (non-cursor) marker height is now 5px. It allows the user
to see other markers under the cursor marker.
- The way the minimum height is imposed on markers has changed a bit to
keep consistency between markers of different types.
- Selected symbol markers use less vibrant color (`info` faded out a
little).
Release Notes:
- Added displaying of cursor markers in the scrollbar. They can be
switched on/off by the `scrollbar.cursors` setting.
Make it more likely the draft release notes work...
Release Notes:
- N/A
Conrad Irwin
created
8e925bf
Don't panic when a tree-sitter parse fails (#11076)
Click to expand commit body
Fixes
https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1714162894982749
Release Notes:
* Fixed a crash that could happen if an error occurred in a parser
provided by an extension.
Co-authored-by: Conrad <conrad@zed.dev>
Max Brunsfeld
and
Conrad
created
adcaa21
Add keybindings to jump to first / last file in project panel (#11073)
Click to expand commit body
Release Notes:
- vim: Support `g g`/`G` to go to top/bottom of the project panel.
In vim type environments i usually expect to be able to jump to the top
and bottom and i was confused as to why that wasn't possible in the
project panel. So i added it. If anyone using different keymaps also
thinks this might be useful i would be happy to add other defaults. I
think for vim mode it is the most useful though, because you tend to not
use your mouse in vim mode.
This is my first contribution to any rust project, but it seemed like a
good starting point.
The function select_last() is inspired by select_first.
I was also thinking about adding a bigger jump keybinding, that would
jump for example 5 entries up / down, with vim default keybindings "{" /
"}".
FYI: I tested this on linux only and don't have access to any macos
machines.
- N/A
blufony
created
393b16d
Fix Wayland keyrepeat getting cancelled by unrelated keyup (#11052)
Click to expand commit body
fixes #11048
## Problem
in the situation `press right`, `press left`, `release right` the
following happens right now:
- `keypressed right`, `current_keysym` is set to `right`
- `keypressed left`, `current_keysym` is set to `left`
the repeat timer runs asynchronously and emits keyrepeats since
`current_keysym.is_some()`
- `keyreleased right`, `current_keysym` is set to None
the repeat timer no longer emits keyrepeats
- `keyreleased left`, this is where `current_keysym` should actually be
set to None.
## Solution
Only reset `current_keysym` if the released key matches the last pressed
key.
Release Notes:
- N/A
Jakob Hellermann
created
7bd18fa
Sync maximized state from top-level configure event for a wayland window (#11003)
Click to expand commit body
* Otherwise is_maximized always returns `true`
Release Notes:
- Fixed maximized state. Tested with a dummy maximize/restore button
with the `zoom()` (not implemented yet). Without the right `maximized`,
in toggle zoom function is not possible to call `set_maximized()` or
`unset_maximized()`.
```rust
fn zoom(&self) {
if self.is_maximized() {
self.borrow_mut().toplevel.unset_maximized();
} else {
self.borrow_mut().toplevel.set_maximized();
}
}
```
Akilan Elango
created
11dc3c2
windows: Support all `OpenType` font features (#10756)
Click to expand commit body
Release Notes:
- Added support for all `OpenType` font features to DirectWrite.
https://github.com/zed-industries/zed/assets/14981363/cb2848cd-9178-4d87-881a-54dc646b2b61
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
张小白
and
Mikayla Maki
created
268cb94
windows: Move manifest file to `gpui` (#11036)
Click to expand commit body
This is a follow up of #10810 , `embed-resource` crate uses a different
method to link the manifest file, so this makes moving manifest file to
`gpui` possible.
Now, examples can run as expected:

TODO:
- [ ] check if it builds with gnu toolchain
Release Notes:
- N/A
张小白
created
6a915e3
windows: Fix panicking on startup (#11028)
Fixes https://github.com/zed-industries/zed/issues/10483 on X11
Also calls the `should_close` callback before closing the window (needed
for the "Do you want to save?" dialog).
Release Notes:
- N/A
apricotbucket28
created
b1eb029
Re-add README.md which might have been deleted by mistake (#11067)
cc @maxbrunsfeld
Release Notes:
- Fixed a panic in populating diagnostics
Conrad Irwin
created
9329ef1
markdown preview: Break up list items into individual blocks (#10852)
Click to expand commit body
Fixes a panic related to rendering checkboxes, see #10824.
Currently we are rendering a list into a single block, meaning the whole
block has to be rendered when it is visible on screen. This would lead
to performance problems when a single list block contained a lot of
items (especially if it contained checkboxes). This PR splits up list
items into separate blocks, meaning only the actual visible list items
on screen get rendered, instead of the whole list.
A nice side effect of the refactoring is, that you can actually click on
individual list items now:
https://github.com/zed-industries/zed/assets/53836821/5ef4200c-bd85-4e96-a8bf-e0c8b452f762
Release Notes:
- Improved rendering performance of list elements inside the markdown
preview
---------
Co-authored-by: Remco <djsmits12@gmail.com>
Still TODO:
* Disable the new save-as for local projects
* Wire up sending the new path to the remote server
Release Notes:
- Added the ability to "Save-as" in remote projects
---------
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
Release Notes:
- Allow reusing the window when opening a remote project from the recent
projects picker
- Fixed an issue, which would not let you rejoin a remote project after
disconnecting from it for the first time
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Remco <djsmits12@gmail.com>
Bennet Bo Fenner
,
Conrad
, and
Remco
created
1af1a9e
Toggle tasks modal in task::Rerun, when no tasks have been scheduled (#11059)
Click to expand commit body
Currently, when no tasks have been scheduled, the `task::Rerun` action
does nothing.
This PR adds a fallback, so when no tasks have been scheduled so far the
`task::Rerun` action toggles the tasks modal
https://github.com/zed-industries/zed/assets/471335/72f7a71e-cfa8-49db-a295-fb05b2e7c905
Release Notes:
- Improved the `task::Rerun` action to toggle the tasks modal when no
tasks have been scheduled so far
bacc923
tasks: Fix divider position in modal (#11049)
Click to expand commit body
The divider between templates and recent runs is constant, regardless of
the currently used filter string; this can lead to situations where an
user can remove the predefined task, which isn't good at all.
Additionally, in this PR I've made it so that recent runs always show up
before task templates in filtered list.
Release Notes:
- Fixed position of list divider in task modal.
Piotr Osiewicz
created
eb7bd0b
Use fewer fancy cursors even for vim users (#11041)
Click to expand commit body
Release Notes:
- N/A
Conrad Irwin
created
7f229dc
Remove unread notes indicator for now (#11035)
Click to expand commit body
I'd like to add something back here, but it's more distracting than
helpful today.
Fixes: #10887
Release Notes:
- Removed channel notes unread indicator
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
cc @someonetoignore
Release Notes:
- Fixed a panic when renaming with a selection (preview only)
Conrad Irwin
created
5c2f27a
Fix VIM cw on last character of a word doesn't work as expected: (#10963)
Click to expand commit body
At the moment, using the default expand_selection seems to do the job
well, without the need for some additional logic, which may also make
the code a little clearer, Fix #10945
Release Notes:
- N/A
Hans
created
d9d509a
Send installation id with crashes (#11032)
Click to expand commit body
This will let us prioritize crashes that affect many users.
Release Notes:
- N/A
Conrad Irwin
created
a4ad3bc
Hoist `nanoid` to workspace-level (#11029)
Click to expand commit body
This PR hoists `nanoid` up to a workspace dependency.
Release Notes:
- N/A
Hi there, nice editor!
Here's my attempt at fixing #10865.
Thanks
Release Notes:
-vim: Fix ctrl+a when cursor is on a decimal point
([#10865](https://github.com/zed-industries/zed/issues/10865)).
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Hendrik Sollich
and
Conrad Irwin
created
d9eb3c4
vim: Fix hollow cursor being offset when selecting text (#11000)
Click to expand commit body
Fixed the cursor selection being offset, the hollow cursor was being
displayed fine when not having text selected that's why it might not
have been noticed at first.
Release Notes:
- N/A
Improved:
https://github.com/zed-industries/zed/commit/0d6fb08b67e26f5e6abd14ff51b3a9ba1d89b9c0
DissolveDZ
created
f8beda0
Rename `chat_with_functions` to use snake_case (#11020)
Click to expand commit body
This PR renames the `chat-with-functions.rs` example to use snake_case
for the filename, as is convention.
Release Notes:
- N/A
Marshall Bowers
created
40fe527
Rework project diagnostics to prevent showing inconsistent state (#10922)
Click to expand commit body
For a long time, we've had problems where diagnostics can end up showing
up inconsistently in different views. This PR is my attempt to prevent
that, and to simplify the system in the process. There are some UX
changes.
Diagnostic behaviors that have *not* changed:
* In-buffer diagnostics update immediately when LSPs send diagnostics
updates.
* The diagnostic counts in the status bar indicator also update
immediately.
Diagnostic behaviors that this PR changes:
* [x] The tab title for the project diagnostics view now simply shows
the same counts as the status bar indicator - the project's current
totals. Previously, this tab title showed something slightly different -
the numbers of diagnostics *currently shown* in the diagnostics view's
excerpts. But it was pretty confusing that you could sometimes see two
different diagnostic counts.
* [x] The project diagnostics view **never** updates its excerpts while
the user might be in the middle of typing it that view, unless the user
expressed an intent for the excerpts to update (by e.g. saving the
buffer). This was the behavior we originally implemented, but has
changed a few times since then, in attempts to fix other issues. I've
restored that invariant.
Times when the excerpts will update:
* diagnostics are updated while the diagnostics view is not focused
* the user changes focus away from the diagnostics view
* the language server sends a `work done progress end` message for its
disk-based diagnostics token (i.e. cargo check finishes)
* the user saves a buffer associated with a language server, and then a
debounce timer expires
* [x] The project diagnostics view indicates when its diagnostics are
stale. States:
* when diagnostics have been updated while the diagnostics view was
focused:
* the indicator shows a 'refresh' icon
* clicking the indicator updates the excerpts
* when diagnostics have been updated, but a file has been saved, so that
the diagnostics will soon update, the indicator is disabled
With these UX changes, the only 'complex' part of the our diagnostics
presentation is the Project Diagnostics view's excerpt management,
because it needs to implement the deferred updates in order to avoid
disrupting the user while they may be typing. I want to take some steps
to reduce the potential for bugs in this view.
* [x] Reduce the amount of state that the view uses, and simplify its
implementation
* [x] Add a randomized test that checks the invariant that a mutated
diagnostics view matches a freshly computed diagnostics view
## Release Notes
- Reworked the project diagnostics view:
- Fixed an issue where the project diagnostics view could update its
excerpts while you were typing in it.
- Fixed bugs where the project diagnostics view could show the wrong
excerpts.
- Changed the diagnostics view to always update its excerpts eagerly
when not focused.
- Added an indicator to the project diagnostics view's toolbar, showing
when diagnostics have been changed.
---------
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Max Brunsfeld
and
Richard Feldman
created
cf2272a
Always submit function definitions in Simple mode too (#11016)
Click to expand commit body
Switches Assistant2 to always provide functions. It's up to the model to
choose to use them. At a later point, the `Submit::Codebase` should
change the `tool_choice` to `query_codebase` rather than `auto`. For
now, I think this will improve the experience for folks testing.
Release Notes:
- N/A
Kyle Kelley
created
366d7e7
Break typography styles out of `StyledExt` (#11013)
Click to expand commit body
- Centralizes typography-related UI styles and methods in
`styles/typography.rs`
- Breaks the typography-related styles out of `StyledExt`. This means we
add a `StyledTypography` trait – this should more or less be an
invisible change as we publish it in the prelude.
- adds the ability to easily grab the UI or Buffer font sizes
(`ui_font_size`, `buffer_font_size`) with `TextSize::UI`,
`TextSize::Editor`
Release Notes:
- N/A