Commit graph

19410 commits

Author SHA1 Message Date
Nate Butler
00971fbe41
Introduce KeybindingHint (#24397)
- Implements scaling for `ui::Keybinding` and it's component parts
- Adds the `ui::KeybindingHint` component for creating keybinding hints
easily:

![CleanShot 2025-02-04 at 16 59
38@2x](https://github.com/user-attachments/assets/d781e401-8875-4edc-a4b0-5f8750777d86)

Release Notes:

- N/A
2025-02-06 21:45:03 +00:00
Ben Kunkle
9c132fece5
Fix #24314 - File icons missing for hidden files (#24391)
- **fix ignoring ignored files when matching icons**
- **remove poorly named and confusing method
`PathExt.icon_stem_or_suffix` and refactor
`PathExt.extension_or_hidden_file_name` to actually do what it says it
does**

Closes #24314

Release Notes:

- Fixed an issue where hidden files would have the default icon instead
of the correct one
- Fixed an issue where files with specific icons (such as
`eslint.config.js`) would not have the their specific icon without a
leading `.` (`.eslint.config.js`)
2025-02-06 14:26:42 -06:00
Danilo Leal
ad46c5b567
edit prediction: Improve the onboarding modal (#24386) 2025-02-06 19:58:53 +00:00
Danilo Leal
c28c767b40
edit prediction: Wordsmith status bar menu docs aside (#24390)
Refining writing in the status bar menu docs aside.

Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <1789+nathansobo@users.noreply.github.com>
2025-02-06 19:49:13 +00:00
Agus Zubiaga
e1bb9570df
edit predictions: Reset onboarding action (#24387)
https://github.com/user-attachments/assets/bb597b93-a616-4f8a-8608-013b8202799c


Release Notes:

- N/A
2025-02-06 19:07:27 +00:00
Marshall Bowers
09967ac3d0
zeta: Send up diagnostics with prediction requests (#24384)
This PR makes it so we send up the diagnostic groups as additional data
with the edit prediction request.

We're not yet making use of them, but we are recording them so we can
use them later (e.g., to train the model).

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2025-02-06 18:07:26 +00:00
Agus Zubiaga
13089d7ec6
edit predictions: Polish up ⌥ preview experience (#24380)
- Do not accept with just `tab` in `when_holding_modifer` mode
- Fix fake cursor for jumps when destination row is outside viewport
- Use current preview state for deciding whether to show modifiers in
popovers
- Stay in preview state if ⌥ isn't released after accepting a jump

Release Notes:

- N/A
2025-02-06 16:13:21 +00:00
0x2CA
c24f22cd14
vim: Fix Around Subword not including whitespace (#24356)
Closes #24271

Release Notes:

- Fixed Around Subword No Include Whitespace
2025-02-06 08:54:04 -07:00
Marshall Bowers
8fc5d227a4
copilot: Sort dev dependencies in Cargo.toml (#24378)
This PR sorts the dev dependencies in `copilot`'s `Cargo.toml`.

Release Notes:

- N/A
2025-02-06 15:19:03 +00:00
Cole Miller
01bcbf3b0d
Fix missing diff hunks in single-file worktrees (#24377)
Release Notes:

- Fixed diff hunks not appearing when opening a single file within a
larger repository
2025-02-06 10:13:56 -05:00
Danilo Leal
592642fbfc
edit predictions: Tweak status bar menu copywriting (#24376)
Just fine-tuning words on items of the status bar menu.

Release Notes:

- N/A
2025-02-06 11:28:25 -03:00
Danilo Leal
35886e38e5
edit prediction: Add minor UI tweaks to the preview bar (#24174)
Just little nudges of spacing, alignment, and treatment for overflowing
content.

Release Notes:

- N/A
2025-02-06 11:00:09 -03:00
Agus Zubiaga
8ed8b4d2ec
edit predictions: Preview while holding modifier mode (#24316)
This PR adds a new `inline_completions.inline_preview` config which can
be set to `auto` (current behavior) or to `when_holding_modifier`.
When set to the latter, instead of showing edit prediction previews
inline in the buffer, we'll show it in a popover (even when there's no
LSP completion) so your isn't constantly moving as completions arrive.


https://github.com/user-attachments/assets/3615d151-3633-4ee4-98b9-66ee0aa735b8

Release Notes:

- N/A

---------

Co-authored-by: Danilo <danilo@zed.dev>
2025-02-06 09:58:19 -03:00
Michael Sloan
69e6910c9c
Add build SHA to panic reports and zed --version (on nightly/dev) (#24258)
Release Notes:

- N/A
2025-02-06 02:09:24 -07:00
Jason Lee
f08b1d78ec
Revert "Revert recent anti-aliasing improvements (#24289)" and fix selection top right corner radius issue (#24342)
Release Notes:

- N/A

----

To fix #24289 mention issue and revert PathBuilder and MSAA.

I'm sorry about of this, in #22808 I was forgotten this bit of detail.


![image](https://github.com/user-attachments/assets/112afda2-088c-41d0-83bd-808f6cd2f9d5)

So, add `move_to` here, we can fix the selection top right corner radius
issue.

## After change

<img width="1383" alt="image"
src="https://github.com/user-attachments/assets/28ea103c-d652-41d6-bbe0-7fd042d81e77"
/>
2025-02-06 11:03:23 +02:00
Michael Sloan
1f2205d75c
Wrap AnyView.cached_style in an Rc to make the struct much smaller (#24363)
Byte size before was 672, now is 56. The `cached` method is only used in
two places, so this was a lot of extra bytes being shuffled around for
every `AnyView` not using this.

Release Notes:

- N/A
2025-02-06 08:37:46 +00:00
James Roberts
00b1964940
auto_update_ui: Show update notification across workspaces (#23458)
When Zed reopens after an auto-update is installed, a notification was
previously displayed in the first window opened. If there were multiple
windows open, the notification could be hidden because Zed reopens the
last session's window stack in order from back to front. Now, the
notification is opened in every workspace, and dismissing the
notification in any workspace will dismisses it everywhere.

Closes #23236

Release Notes:

- Improved notification after Zed is updated to be visible in all
workspaces.

---------

Co-authored-by: Michael Sloan <michael@zed.dev>
2025-02-06 08:05:41 +00:00
Michael Sloan
10792ee0ad
First check if menu visible in layout_gutter_menu (#24259)
Also uses an expect instead of unwrap for result of
`render_context_menu`

Release Notes:

- N/A
2025-02-06 06:46:23 +00:00
João Marcos
c61f12dd22
Zeta: Skip opening files redundantly if a license was found (#24357)
Release Notes:

- N/A
2025-02-06 06:07:05 +00:00
João Marcos
1cdfbe2d5f
License detection: also check LICENSE.txt and LICENCE.txt (#24351)
and move the list of files to `crates/zeta/src/license_detection.rs`
for better visibility.

Release Notes:

- N/A
2025-02-06 04:04:35 +00:00
Ben Kunkle
8b3d315e40
Fix #24081 - lsp diagnostic code type conversion (#24347)
- **store `buffer::Diagnostic`as NumberOrString instead of assuming
String**
- **update zed-industries/lsp-types rev**

Closes #24081

Release Notes:

- Fixed an issue where language server diagnostic codes would be converted to strings leading to errors with some language servers
2025-02-05 21:23:46 -06:00
Mikayla Maki
10b6bc2508
Fix broken merge (#24341)
Release Notes:

- N/A
2025-02-06 02:21:42 +00:00
Amr Bashir
4270f89956
gpui: Implement HasWindowHandle on Window (#24327)
Implement `raw_window_handle::HasWindowHandle` for `gpui::Window`

This opens a lot of possibility of using gpui with platform specific
APIs.

Edit: With this exposed, we can use crates like `window-vibrancy`,
`muda` (menus crate) or even use `wry` (a webview renderer) to create a
child `WebView` inside the gpui window.

Release Notes:

- N/A
2025-02-06 01:55:17 +00:00
Conrad Irwin
0a70627f00
Split conflicts into their own section (#24324)
Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:

- N/A
2025-02-05 18:34:14 -07:00
Conrad Irwin
5d1c56829a
Add staged checkboxes to multibuffer headers (#24308)
Co-authored-by: Mikayla <mikayla@zed.dev>

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2025-02-05 18:32:07 -07:00
Marshall Bowers
0671be215f
gpui: Render SVGs at 2x size when rendered in an img (#24332)
This PR adjusts the rendering of SVGs when used with the `img` element
such that they are rendered at 2x their displayed size.

This results in much crisper icons for icons loaded by icon themes:

<img width="1136" alt="Screenshot 2025-02-05 at 7 39 48 PM"
src="https://github.com/user-attachments/assets/47d1fcee-c54d-4717-8fca-9b9d2bc8da9a"
/>

<img width="1136" alt="Screenshot 2025-02-05 at 7 40 01 PM"
src="https://github.com/user-attachments/assets/3061157c-8c88-41c1-a5dc-83ef9cd341cb"
/>

Release Notes:

- Improved the resolution of icons rendered by icon themes.
2025-02-06 01:05:43 +00:00
Marshall Bowers
4e5b11a0a7
extensions_ui: Add general structure for filtering extensions by what they provide (#24325)
This PR adds the general structure for filtering the extensions list by
what the extensions provide.

Currently flagged for Zed staff until we get some design direction on
how best to present the filter.

Release Notes:

- N/A
2025-02-06 00:09:37 +00:00
Marshall Bowers
d81a4ec7ec
file_icons: Use a separate icon key for HTML files (#24323)
This PR updates the file icon mappings such that HTML (`.html` and
`.htm`) files map to the `html` key.

This allows for the HTML file icons to be replaced in icon themes.

Release Notes:

- Icon themes: Added the ability to change the file icon for HTML
(`.html`, `.htm`) files.
2025-02-05 18:35:27 -05:00
Kirill Bulatov
980ce5fbf2
Move git status updates to a background thread (#24307)
Part of https://github.com/zed-industries/zed/issues/24099
Part of https://github.com/zed-industries/zed/issues/23025

Git status checks & updates are still slow for such repos, but those are
now not blocking FS entry population and rescans.

Release Notes:

- Improved project panel's speed in large projects
2025-02-05 23:14:26 +00:00
Michael Sloan
1dbca5d9a0
Mostly fix hover tooltips not respecting occlusion (#24319)
Regression in #22644

Unfortunately not a full fix, In the case where a tooltip gets displayed
and then gets occluded after display, it will stick around until the
mouse exits the hover bounds.

Release Notes:

- N/A

Co-authored-by: Ben <ben@zed.dev>
2025-02-05 23:08:56 +00:00
Marshall Bowers
e1919b4121
collab: Add the ability to filter extensions by what they provide (#24315)
This PR adds the ability to filter extension results from the extension
API by the features that they provide.

For instance, to filter down just to extensions that provide icon
themes:

```
https://api.zed.dev/extensions?provides=icon-themes
```

Release Notes:

- N/A
2025-02-05 22:12:18 +00:00
Patrick Detlefsen
c0dd7e8367
open_ai: Include o3-mini in Model::from_id (#24261) 2025-02-05 16:45:38 -05:00
Marshall Bowers
b7244af093
extensions_ui: Show extension features on cards (#24310)
This PR updates the extensions list to display the features that an
extension provides.

<img width="1309" alt="Screenshot 2025-02-05 at 4 12 07 PM"
src="https://github.com/user-attachments/assets/ff0c61cd-b7fe-49c3-9fc8-a0ab6b0511a6"
/>

Note that this will only show up for extensions that have this data
(which will be extensions published/updated on or after now).

Here's the view with some mocked data:

<img width="1309" alt="Screenshot 2025-02-05 at 4 01 56 PM"
src="https://github.com/user-attachments/assets/d6d6a818-d6ac-4162-9309-95472b17833a"
/>

Release Notes:

- N/A
2025-02-05 21:31:52 +00:00
Max Brunsfeld
ca01a8b9cb
Fix two issues with diff highlights (#24309)
* fix syntax highlighting of deleted text when buffer language changes
* do not highlight entire untracked files as created, except in the
project diff view

Release Notes:

- N/A

Co-authored-by: ConradIrwin <conrad.irwin@gmail.com>
Co-authored-by: cole-miller <m@cole-miller.net>
2025-02-05 21:29:39 +00:00
Conrad Irwin
9114ca973c
Revert "Revert "Upgrade to rustls v0.23.22" (#24197)" (#24210)
try to reland rustls without breaking linux arm builders

See: 
- #24197
- #24138

Release Notes:

- N/A
2025-02-05 14:24:21 -07:00
Max Brunsfeld
b710945949
Fix replication of head text when head matches index (#24306)
Release Notes:

- N/A

---------

Co-authored-by: cole-miller <m@cole-miller.net>
2025-02-05 20:37:32 +00:00
Marshall Bowers
59738f88c2
collab: Store features provided by extensions in the database (#24303)
This PR adds new columns to the `extension_versions` table to record
which features an extension provides.

These `provides_*` columns are populated from the `provides` field on
the extension manifest.

We'll be able to leverage this data in the future for showing what an
extension provides in the extensions UI, as well as allowing to filter
by extensions that provide a certain feature.

Release Notes:

- N/A
2025-02-05 19:50:24 +00:00
Marshall Bowers
2f5abe2b5a
panel: Remove unneeded lib.name field in Cargo.toml (#24301)
This PR removes the `name` field from under `lib` in the `Cargo.toml`
file for the `panel` crate, as it isn't necessary.

Also removed it from `script/new-crate`.

Release Notes:

- N/A
2025-02-05 19:30:06 +00:00
Conrad Irwin
44a7614a74
Fix panic when editing diff (#24298)
Release Notes:

- N/A
2025-02-05 12:14:02 -07:00
Conrad Irwin
9369b72475
Delete old project diff code (#24299)
Closes #ISSUE

Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:

- N/A
2025-02-05 12:13:54 -07:00
Conrad Irwin
971a91ced7
Commit All Mode (#24293)
- **Base diffs on uncommitted changes**
- **Show added files in project diff view**
- **Fix git panel optimism**
- **boop**
- **Co-Authored-By: Cole <cole@zed.dev>**
- **Fix commit (all) buttons state**
- **WIP**
- **WIP: commit all mode**

Closes #ISSUE

Release Notes:

- N/A
2025-02-05 12:13:32 -07:00
Nate Butler
6d81ad1e0b
git_ui: Start unifying panel style with other panels (#24296)
- Adds the `panel` crate for defining UI shared between panels, like
common button and header designs, etc
- Starts to update the git ui to be more consistent with other panels

Release Notes:

- N/A
2025-02-05 13:54:14 -05:00
Conrad Irwin
70b1e0eec0
Fix expand buttons adjacent to folded hunks (#24297)
Release Notes:

- Fix expand buttons adjacent to folded hunks
2025-02-05 11:48:33 -07:00
Cole Miller
ffe503d77c
Fix spurious addition hunks in files with no git repo (#24288)
Release Notes:

- N/A
2025-02-05 13:41:08 -05:00
Marshall Bowers
5a25751521
extension_cli: Include the list of what an extension provides in the generated manifest (#24295)
This PR updates the Zed extension CLI with support for populating the
`provides` field in the generated extension manifest.

This field will contain the set of features that the extension provides.

For example:

```
"provides": ["themes", "icon-themes"]
```

Release Notes:

- N/A
2025-02-05 18:17:19 +00:00
Kirill Bulatov
aaf432fcd2
Revert recent anti-aliasing improvements (#24289)
This reverts commit 31fa414422.
This reverts commit b9e0aae49f.

`lyon` commit revert:

![image](https://github.com/user-attachments/assets/0243f61c-0713-416d-b8db-47372e04abaa)

`MSAA` commit revert:

![image](https://github.com/user-attachments/assets/b1a4a9fe-0192-47ef-be6f-52e03c025724)

cc @huacnlee , @\as-cii had decided to revert this PR due to a selection
right corner rendering bug.
Not sure what to propose for a fix from my side

Release Notes:

- N/A
2025-02-05 17:17:26 +00:00
Bennet Bo Fenner
e1a6d9a485
edit prediction: Improve UX around disabled_globs and show_inline_completions (#24207)
Release Notes:

- N/A

---------

Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-05 17:09:19 +00:00
Danilo Leal
37db1dcd48
Revise the MessageNotification component (#24287)
This PR makes adding icons to the primary and secondary actions, in the
`MessageNotification` component, optional. Also took the opportunity to
remove a probably unnecessary "third action" from it; streamlining the
component API (we had added that for a design that we're not using
anymore). I did keep the "more info" possibility, which may be useful in
the future, though.

Release Notes:

- N/A
2025-02-05 13:39:27 -03:00
Danilo Leal
17a7495332
edit prediction: Fix license detection error logging + check for different spellings (#24281)
Follow-up to https://github.com/zed-industries/zed/pull/24278

This PR ensures we're checking if there's a license-type file in both US
& UK English spelling, and fixes the error logging again, treating for
when the worktree contains just a single file or multiple.

Release Notes:

- N/A

Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
2025-02-05 13:15:41 -03:00
Cole Miller
6b29616c95
Fix the worktree's repository_for_path (#24279)
Go back to a less optimized implementation for now since the custom
cursor target seems to have some bugs.

Release Notes:

- Fixed missing git blame and status output in some projects with
multiple git repositories
2025-02-05 10:37:51 -05:00