Instead of eagerly calling `to_offset` on the anchor ranges for each
diagnostic in the direction of the search, work lazily in terms of
anchors and convert to offsets at the very end.
Release Notes:
- N/A
This fixes a bug that prevents unstaging added files.
I've also removed the batching/debouncing logic in the long-running task
that launches the git invocations---I added this originally but I don't
think it's really necessary.
Release Notes:
- N/A
This PR pulls the directory and chevron icons out of the
`IconTheme::file_icons` collection and promotes them to named fields.
This makes things less stringly-typed when looking up these icons.
Release Notes:
- N/A
This PR adds the initial concept of an `IconTheme` and refactors
`FileIcons` to use it to resolve the icons.
The `IconTheme` will ultimately be used to allow users to select a
different set of icons to use. Currently, however, this is just laying
the foundation for that work.
The association between file types and icons is now handled by the icon
theme when we resolve file icons. This mapping has been moved out of
`file_types.json` and into `icon_theme.rs`.
Release Notes:
- N/A
This PR adjusts the design of the assistant 2 threads with the goal of
reducing visual busyness. My intention is to remove the amount of lines
and borders given it is a relatively tight space. It also refines the
"generating" floating container style, finally leveraging linear
gradients that were recently added to GPUI! Now, we only display headers
for "you" messages. Assistant responses will be rendered right in the
panel; not bounded by a card container.
<img width="800" alt="Screenshot 2025-01-14 at 7 08 39 PM"
src="https://github.com/user-attachments/assets/a8ffa780-0ef2-4d4b-ae19-3f02fd2d63a6"
/>
Release Notes:
- N/A
- Reverts zed-industries/zed#22904
- See also: https://github.com/zed-industries/zed/issues/8580
After using it full-time for a day I very much think an implicit "mark
mode" when the emacs base keymap is enabled is the wrong approach.
Release Notes:
- Reverted "Add emacs keybindings for mark emulation" #23146 (main only)
- Clicking checkbox in the header stages or unstages all changes
- Adds tooltips to header checkbox
- Addis the ability for checkboxes to have tooltips
- Ensure an entry in the list is always selected
- Hide revert all button for now
Release Notes:
- N/A
This just opens the file for the selected `GitListEntry` right now;
we'll add back integration with the project diff view later.
Release Notes:
- N/A
---------
Co-authored-by: Nate <nate@zed.dev>
This PR makes it so the pending completion is cleared when an error
occurs.
This makes it so `Thread::is_streaming()` will return `false` in the
error case (and thus hide the streaming indicator in the UI).
Release Notes:
- N/A
Two issues i ran into while looking at the completion rating modal
- Single-file worktrees file names are not displayed at all
- Hard to see the filename when the path is long (lots of directories)
This PR fixes this by displaying the filename on the left, followed by
the full path (including the worktree name), similar to how we do it in
the file finder/assistant panel /file command
| Before | After |
|--------|--------|
| <img width="1067" alt="Screenshot 2025-01-14 at 16 09 05"
src="https://github.com/user-attachments/assets/628fde18-da9a-4d98-8ddf-ed0ab0cd8d35"
/> | <img width="1161" alt="Screenshot 2025-01-14 at 16 17 52"
src="https://github.com/user-attachments/assets/80c6a4e1-065d-4b0a-b9c0-5f3391af4557"
/> |
Release Notes:
- N/A
This fixes an error message that has shown up for me when joining collab
projects: "Unable to load shell environment in /<path on another
machine/"
Release Notes:
- Fixed error message about shell environment failing to load when
joining projects in collaboration.
Context pills are now focusable and intractable via the keyboard.
- <kbd>←</kbd> and <kbd>→</kbd> move the focus to the previous or next
item (wrapping if necessary)
- <kbd>↓</kbd> and <kbd>↑</kbd> move the focus vertically
- If the cursor is in the first/last row of the assistant/inline editor,
they will move the focus to the strip
- Inside the strip, they will move the focus to the pill horizontally
overlapping the most
- If already in the first/last row of the strip, they will move to the
first/last pill (like in editors)
- If the first/last pill is focused, they will move the focus back to
the editor
- <kbd>⌫</kbd> removes the focused pill (unless it's the suggested one)
- <kbd>⏎</kbd> accepts the suggested pill if focused
https://github.com/user-attachments/assets/040bc71c-a3ae-4961-9886-2d5c3d290a73
Release Notes:
- N/A
This PR adds settings for the Git Panel.
The new settings include:
| Setting | Description | Default |
|---------|-------------|---------|
| `git_panel.button` | Toggle visibility of the Git Panel button in the
status bar | `true` |
| `git_panel.dock` | Choose where to dock the Git Panel | `"left"` |
| `git_panel.default_width` | Set the default width of the Git Panel in
pixels | `360` |
| `git_panel.status_style` | Select how Git status is displayed |
`"icon"` |
| `git_panel.scrollbar.show` | Configure scrollbar behavior | Inherits
from editor settings |
Example usage:
```json
"git_panel": {
"button": true,
"dock": "left",
"default_width": 360,
"status_style": "icon",
"scrollbar": {
"show": "auto"
}
}
```
Release Notes:
- N/A
Various fixes for Zeta and one fix that's visible to non-Zeta-using
users of inline completions.
Release Notes:
- Changed inline completions (Copilot, Supermaven, ...) to not show up
in empty buffers.
---------
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Bennet <bennet@zed.dev>
This is a follow-up to #12640.
While profiling latency of working with a project with 8192 diagnostics
I've noticed that while we're parsing the LSP messages into a generic
message struct on a background thread, we can still block the main
thread as the conversion between that generic message struct and the
actual LSP message (for use by callback) is still happening on the main
thread.
This PR significantly constrains what a message callback can use, so
that it can be executed on any thread; we also send off message
conversion to the background thread. In practice new callback
constraints were already satisfied by all call sites, so no code outside
of the lsp crate had to be adjusted.
This has improved throughput of my 8192-benchmark from 40s to send out
all diagnostics after saving to ~20s. Now main thread is spending most
of the time updating our diagnostics sets, which can probably be
improved too.
Closes #ISSUE
Release Notes:
- Improved app responsiveness with huge # of diagnostics.
Follow-up of https://github.com/zed-industries/zed/pull/23112
Same reasoning applies.
Release Notes:
- Changed default formatter for C to be the primary language server, not
Prettier. Format-on-save is still disabled by default for C, but if one
uses the editor: format command now, it will default to the language
server. clangd can format C files, whereas prettier cannot.
As @hferreiro points out in [this
comment](https://github.com/zed-industries/zed/pull/18752#issuecomment-2589340565):
C++ and prettier don't work well together, so let's make the default
formatter for C++ the primary language server. We get that by disabling
prettier.
Release Notes:
- Changed default formatter for C++ to be the primary language server,
not Prettier. Format-on-save is still disabled by default for C++, but
if one uses the `editor: format` command now, it will default to the
language server. `clangd` can format C++ files, whereas prettier cannot.
This PR is a follow-up to
https://github.com/zed-industries/zed/pull/22911 to further improve the
registration of code action providers for the Assistant in order to
prevent duplicates.
The `CodeActionProvider` trait now has an `id` method that is used to
return a unique ID for a code action provider. We use this to prevent
registering duplicates of the same provider.
The registration of the code action providers for Assistant1 and
Assistant2 have also been reworked. Previously we were not call the
registration function—and thus setting up the subscriptions—until we
resolved the feature flags. However, this could lead to the registration
happening too late for existing workspace items.
We now perform the registration right away and then remove the undesired
code action providers once the feature flags have been resolved.
Release Notes:
- N/A
This PR fixes an issue with jumping from multi_buffer to a file; namely,
the scroll offset of the opened buffer used to match the position within
the multibuffer, but it broke a while back. This is because we were
opening a buffer without providing the data about the origin scroll
offset.
Closes #ISSUE
Release Notes:
- Fixed a bug where the relative position of an excerpt within the
multibuffer was not accounted for while jumping to the buffer, causing
the clicked line to drastically change position on screen.
The new `ContextMenu`-based `ContextPicker` requires initialization when
opened, but we were only doing this for the `ContextStrip` picker, not
the inline one.
Additionally, because we have a wrapper element around ContextMenu, we
need to propagate the `DismissEvent` so that it properly closes when
Escape is pressed.
Release Notes:
- N/A
These comments are inaccurate. Even if `convert_case` provided a way to
customize which boundaries were used (which is now does, it 0.7.1), they
would be removed from the string and replaced with the new boundary
character (`-`, `_`, ...), and we'd lose the ability to reconstruct the
text the way the author formatted it. This is not a hack, this is the
way we have to do it.
Release Notes:
- N/A
In current code this doesn't have benefit. In preparation for avoiding a
clone of workspace configuration. Having the interface this way may make
opportunities for efficiency clearer in the future
Release Notes:
- N/A