Commit graph

19494 commits

Author SHA1 Message Date
Marshall Bowers
d6a2a0b04a
zeta: Rename data_collection_permission back to can_collect_data (#24225)
This PR renames some bindings from `data_collection_permission` back to
`can_collect_data`, as the latter name is clearer on account of being a
modal verb.

Release Notes:

- N/A
2025-02-04 21:02:26 +00:00
Agus Zubiaga
58db66ef44
edit prediction: Do not render jump cursor until line layout is ready (#24226)
This is pretty rare but I found a case where `line_layouts` didn't have
the requested line yet, so we now skip rendering the cursor for that
period and avoid panicking.

Release Notes:

- N/A
2025-02-04 17:58:25 -03:00
Max Brunsfeld
6f0f9d631e
Allow running cancel-language-server-work action w/o editor focused (#24215)
Release Notes:

- Added the ability to run the `cancel language server work` action
while a panel (like the terminal panel) is focused
2025-02-04 20:49:08 +00:00
Cole Miller
5704b50fb1
git: Compute and synchronize diffs from HEAD (#23626)
This PR builds on #21258 to make it possible to use HEAD as a diff base.
The buffer store is extended to support holding multiple change sets,
and collab gains support for synchronizing the committed text of files
when any collaborator requires it.

Not implemented in this PR:

- Exposing the diff from HEAD to the user
- Decorating the diff from HEAD with information about which hunks are
staged

`test_random_multibuffer` now fails first at `SEED=13277`, similar to
the previous high-water mark, but with various bugs in the multibuffer
logic now shaken out.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Ben <ben@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>
2025-02-04 15:29:10 -05:00
Mikayla Maki
69bb0a0597
Fix slow focus transitions to the terminal panel (#24172)
This long standing bug was caused by `Pane`'s focus_in handler bouncing
the focus to another handle.
Because focus resolution happens _after_ a frame has been rendered, the
only way to deal with this case is to schedule another frame to be
redrawn. However, we where suppressing all window refreshes that occur
during a focus transfer, causing this focus change to be completely
missed. However, changing this behavior can lead to infinite notify
loops, due to drawing a frame causing another to be rendered.

This PR fixes this problem narrowly by adding an `on_next_frame()`
callback in the pane's focus handle, so that the focus changes take
effect almost immediately. But only for this case, where we know it
doesn't cause infinite notify loops.

TODO:
- [x] Fix the infinite notify loop bug or determine a third way to fix
this lag

Release Notes:

- Fixed a bug where shifting focus to the terminal panel could be slow
2025-02-04 20:23:20 +00:00
Mikayla Maki
cfe0932c0a
Implement character index for point (#23989)
Fixes #22939
Fixes #23970
Supersedes https://github.com/zed-industries/zed/pull/23469

Release Notes:

- Fixed a bug where Zed could crash with certain input sources on macOS

---------

Co-authored-by: Louis Brunner <louis.brunner.fr@gmail.com>
Co-authored-by: ben <ben@zed.dev>
2025-02-04 20:15:43 +00:00
Henry Chu
7da60995cc
Enable CSS, JSON, Python, and Tailwind to lookup LSP installed in PATH (#22037)
Co-authored-by: Peter Tripp <peter@zed.dev>
2025-02-04 14:50:49 -05:00
Peter Tripp
ee422dea6e
Bump Zed to v0.174 (#24221) 2025-02-04 14:38:37 -05:00
Michael Sloan
f8c436fe7f
Fix prediction preview binding: Alt + Preview -> Alt Preview (#24220)
Release Notes:

- N/A
2025-02-04 19:32:30 +00:00
Michael Sloan
b5d4b17f60
Fix showing "enter Accept" for prediction with LSP menu open (#24218)
Release Notes:

- N/A
2025-02-04 19:15:14 +00:00
Kirill Bulatov
3e68f7fde4
Revert "Skip COMMIT_EDITMSG contents when opening the file (#24146)" (#24216) 2025-02-04 21:05:10 +02:00
Mikayla Maki
e768eb0a34
Replace Window::parent_view_id() with Window::current_view() (#24212)
Chatted with @as-cii about limitations in the `Window::parent_view_id()`
API (see:
https://github.com/zed-industries/zed/pull/24182/commits/662153dcfdd80804f4041761c09c4a309d79f6d4)
and realized that I shouldn't be using the dispatch tree's data
structures as they are layout dependent. I've introduced a new stack to
`Window`, `rendered_entity_stack`, that tracks exactly which view's
elements are being drawn. As such, I've also been able to remove the
`Option<>` around the previous API.

Release Notes:

- N/A
2025-02-04 18:50:21 +00:00
Richard Feldman
667396c44b
Use the term "edit prediction" over "inline completion" (#24211)
Note that this does *not* involve any breaking code changes.

cc @0xtimsb - I didn't change any settings or anything here. That can
happen separately!

Release Notes:

- N/A
2025-02-04 10:33:01 -08:00
Antonio Scandurra
c64b26110c
Revert "edit prediction: Try to expand context to parent treesitter region" (#24214)
Reverts zed-industries/zed#24186
2025-02-04 18:32:17 +00:00
Anthony Eid
8c7096f7a6
Rename model based variable names to entity (#24198)
## Context
While looking through the client crate, I noticed that some of the old
functions and variables were still using gpui::model name that was
deprecated during the gpui3 transition. This PR renames those instances
of model to entity to be more inline with gpui3.

In addition, I also renamed `model` to `entity` in cases found by the
below search terms given by @someone13574

- model = cx.
- model: Entity
- model: &Entity
- OpenedModelHandle
- model.update
- model.upgrade
- model = .*\.root (regex)
- parent_model
- model = cx.new
- cx.spawn(move |model

Release Notes:

- N/A
2025-02-04 10:24:35 -08:00
Max Brunsfeld
27d1c689cf
Avoid subtraction overflow when excerpt primary is outside of excerpt… (#24213)
This fixes a "subtract with overflow" error that could happen in debug
mode when viewing the project diagnostics.

From git bisecting, I think that this behavior was introduced by
https://github.com/zed-industries/zed/pull/21942. It seems like it's
possible in some cases for the excerpt-expansion heuristic to cause the
excerpt's `context` range to start *after* the excerpt's `primary`
range. We should probably revisit that heuristic at some point, but it
also seems reasonable to handle that situation at this layer, rather
than overflowing.

Release Notes:

- N/A
2025-02-04 18:24:05 +00:00
Mikayla Maki
4ab4e87266
Fix a bug in GPUI, where AsyncApp::update wouldn't kick off a flush effects loop (#24208)
Release Notes:

- N/A
2025-02-04 10:00:11 -08:00
Agus Zubiaga
4f98157e64
edit predictions: Make Zed bar at least as wide as menu (#24206)
Release Notes:

- N/A

---------

Co-authored-by: Ben <ben@zed.dev>
2025-02-04 17:45:45 +00:00
Agus Zubiaga
9b031d747f
edit prediction: Use thin cursor for jump preview and gradients instead of ellipsis (#24202)
https://github.com/user-attachments/assets/06e14893-c285-4cea-927c-75e82a378b15

Release Notes:

- N/A

---------

Co-authored-by: Ben <ben@zed.dev>
2025-02-04 14:25:18 -03:00
Antonio Scandurra
aea36f0eff
Prevent requesting more than 3 edit predictions per second (#24203)
Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2025-02-04 18:07:24 +01:00
Bennet Bo Fenner
cae712e740
edit prediction: Try to expand context to parent treesitter region (#24186)
Also send the `speculated_output` (which is just the editable region) to
the llm backend

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-02-04 18:03:26 +01:00
Peter Tripp
c50cb90d6f
Revert "Upgrade to rustls v0.23.22" (#24197)
Reverts zed-industries/zed#24138

Nightly build failed, I believe because of this.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189


![image](https://github.com/user-attachments/assets/8121dfb7-4ae7-4efb-8625-f07967640620)

CC: @ConradIrwin 

Release Notes:

- N/A
2025-02-04 10:20:07 -05:00
Nate Butler
a0269aba77
theme_selector: Add a button to open the extension store (#24195)
Adds a button to the theme selector to help people find more themes in
the extension store.

![CleanShot 2025-02-04 at 09 00
20@2x](https://github.com/user-attachments/assets/fd430ff5-b0e3-4be0-ac4a-eeaf0093089b)

Release Notes:

- Added a way to access the extension store from the theme selector to
make it easier to find new themes.
2025-02-04 14:13:24 +00:00
Jacob Chapel
28536498c9
copilot: Correct o3-mini context length (#24152)
It should be 200k (with 100k output). I can't find anything that puts it
at 20k and the changeover in
2f82374926
only changed the name from o1-mini to o3-mini

References:
*
https://docs.github.com/en/copilot/using-github-copilot/asking-github-copilot-questions-in-github#ai-models-for-copilot-chat
* https://github.com/marketplace/models/azure-openai/o3-mini
* https://platform.openai.com/docs/models#o3-mini

Release Notes:

- Corrected Github Copilot o3-mini context length

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-04 09:01:36 -05:00
Bennet Bo Fenner
cc2ebb96a6
Revert "inline completion: Respect disabled_globs when manually requesting completions (#24121)" (#24189)
This reverts commit eb820ab800.
The previous PR broke manual completions. Turns out there is more
confusing behavior then i realized, will follow up with another PR soon.

Closes #ISSUE

Release Notes:

- N/A
2025-02-04 13:02:45 +00:00
Mikayla Maki
d400bdea76
Add example compilation to CI (#24182)
Stop https://github.com/zed-industries/zed/pull/24165 from happening

Release Notes:

- N/A
2025-02-04 09:48:54 +00:00
Mikayla Maki
71f2cbe798
Git Panel: separate new and changed (#24181)
Release Notes:

- N/A

---------

Co-authored-by: conrad <conrad@zed.dev>
Co-authored-by: nate <nate@zed.dev>
2025-02-04 09:15:09 +00:00
Kirill Bulatov
6659aea13b
Disallow multiple quit confirmations (#24180)
Closes https://github.com/zed-industries/zed/issues/10192 , again.

Release Notes:

- Fixed multiple save modals appearing when app is being closed multiple
times
2025-02-04 09:09:46 +00:00
Danilo Leal
386cfacb25
zeta: Fix data collection display on the status bar menu (#24177)
Follow-up to: https://github.com/zed-industries/zed/pull/24031

This PR adds a new function that allows the UI also to display the state
of the data collection. Previously, we only showed that if the project
adhered to the `is_open_source` condition. Now, we show it for all
projects.

Release Notes:

- N/A
2025-02-04 08:05:28 +00:00
Danilo Leal
e5c3273486
status_bar: Only show divider for left dock (#24178)
Follow up to https://github.com/zed-industries/zed/pull/24114

Just fixing the UI so that the divider only shows for the
left-positioned items.

Release Notes:

- N/A
2025-02-04 08:02:29 +00:00
Michael Sloan
556b0eb4f1
Show larger jump target preview + add ellipsii to indicate truncation (#24179)
Release Notes:

- N/A
2025-02-04 08:00:48 +00:00
Agus Zubiaga
93f8ccaaee
zeta: Revised data-collection onboarding experience (#24031)
Release Notes:

- N/A

---------

Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: João Marcos <marcospb19@hotmail.com>
2025-02-04 04:06:09 -03:00
Michael Sloan
29e559d60c
Fix display of + between modifiers on linux and windows (#24173)
Regressions in #24024:

* `+` was no longer included between modifiers and key
* Multi-character keys like "control" were displayed all lowercase,
whereas before they were all uppercase like "CONTROL". Now they are
capitalized, so "Control".
* Brings back icon for tab key.

Release Notes:

- N/A
2025-02-04 07:03:35 +00:00
Conrad Irwin
9a22ef2fd5
Don't save deleted files (#24171)
We now treat new files that have no content as not-dirty. This fixes the
git diff view when deleted files are present.

It also fixes a long-standing bug where `zed RAEDME` and then closing
the tab would prompt for "unsaved changes" when there were none.

Release Notes:

- Fixed a bug where closing an empty, named, file would warn about
unsaved content.
2025-02-03 23:31:34 -07:00
Michael Sloan
66e0898425
Fix corner case where edit prediction preview and docs aside overlap (#24170)
+ add docs and simplify logic around popover order

Release Notes:

- N/A
2025-02-04 06:05:36 +00:00
Conrad Irwin
cf4539ec79
Handle empty diff excerpts (#24168)
Release Notes:

- Fix display, revert and undo of deleted hunks when the file is empty.
2025-02-03 22:55:11 -07:00
Nathan Sobo
8bce896395
Invalidate GPUI views regardless of draw phase (#24164)
We think this could fix issues around view invalidation during focus
handling.

I want to run CI on this and see.

cc @mikayla-maki @maxbrunsfeld 

Release Notes:

- N/A
2025-02-03 21:44:07 -08:00
Kirill Bulatov
ea66a54cf8
Skip COMMIT_EDITMSG contents when opening the file (#24146) 2025-02-04 07:23:14 +02:00
Conrad Irwin
225f0c4d12
Fix input example (#24165)
Release Notes:

- N/A
2025-02-03 22:09:45 -07:00
Ben Kunkle
daf09fa532
Fix issue where changing the case of a vim object would be clipped at the end of the line (#24163)
Co-authored-by: Conrad Irwin <conrad@zed.dev>

Closes #24124

Release Notes:

- Fixed an issue in vim mode where changing the case of an object at the
end of the line would not change the case of the last character in the
object

Co-authored-by: Conrad Irwin <conrad@zed.dev>
2025-02-04 03:40:45 +00:00
Ben Kunkle
8742c18107
Allow auto-indenting with syntax errors when using regex-based indent matches to improve bash auto-indent behavior (#24160)
- Fixes auto-indent issues around `elif` caused by auto-indent being prevented due to syntax errors generated before `elif` clause completed

Release Notes:

- Fixed an issue where inserting an elif before an else in bash would
not properly auto-indent

---------

Co-authored-by: Conrad Irwin <conrad@zed.dev>
2025-02-03 21:34:37 -06:00
Conrad Irwin
e17f307189
vim: Load keymap after base keymap (#24161)
Closes #22562

Release Notes:

- vim: Load vim keymap after a user-configured keymap
2025-02-04 03:25:20 +00:00
Agus Zubiaga
4c29e1ff07
zeta: Improve UX for simultaneous LSP and prediction completions (#24024)
Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Richard <richard@zed.dev>
2025-02-03 21:47:11 -03:00
Ben Kunkle
b6e680ea3d
Support bash autoindenting (#24156)
Creates an indents.scm file for bash and adds regexes for
`{increase,decrease}_indent_pattern` in
`crates/languages/src/bash/config.toml`
so that autoindent works as expected in bash

Note that this PR does not attempt to handle all cases where indenting
might be desired in bash. I am aiming to support ~80% of what people
want while avoiding the more gnarly/edge cases like indented blocks in
case statements and indenting for associative arrays.
This is done with the explicit hope that someone (possibly from the
community) more familiar with and passionate about bash can come through
at a later date and handle those cases

Closes #23628

Release Notes:

- Add basic support for autoindent functionality in bash/shell files
2025-02-04 00:37:52 +00:00
Michael Sloan
28b80455f9
Fix missing modifier changed events on Linux X11 (#24154)
Release Notes:

- Fixed some modifier changed events not being present on Linux X11.
This affected things like the project search palette, where holding ctrl
would not cause the split options to appear.
2025-02-04 00:12:24 +00:00
Max Brunsfeld
13b7be12bd
themes: Make background colors partly transparent by default (#24151)
Certain themes define the `created` and `deleted` status colors, but not
`created_background` and `deleted_background`. Previously, Zed would use
`created` and `deleted` colors, and apply a hard-coded opacity change,
but *not* use `created_background` and `deleted_background`, but that
behavior was inadvertently changed in
https://github.com/zed-industries/zed/pull/22994.

This PR restores the old behavior as a fallback. If a theme defines a
status color, but not the corresponding background color, we'll use a
75% transparent version of the foreground color as a fallback.

Release Notes:

- Fixed an issue in certain themes where diffs would render with the
wrong red and green colors for deletions and insertions.
2025-02-03 22:38:14 +00:00
Kirill Bulatov
1ec91a8738
Clip points when searching for @ in the Assistant 2 panel (#24147)
Release Notes:

- N/A
2025-02-03 21:42:13 +00:00
Joseph T. Lyons
11e095b56a
Fix editor edited event property field name (#24145)
Release Notes:

- N/A
2025-02-03 21:28:14 +00:00
Conrad Irwin
45708d2680
Project Diff 2 (#23891)
This adds a new version of the project diff editor to go alongside the
new git panel.

The basics seem to be working, but still todo:

* [ ] Fix untracked files
* [ ] Fix deleted files
* [ ] Show commit message editor at top
* [x] Handle empty state
* [x] Fix panic where locator sometimes seeks to wrong excerpt

Release Notes:

- N/A
2025-02-03 13:18:50 -07:00
Conrad Irwin
4f63423d56
Upgrade to rustls v0.23.22 (#24138)
This will help us debug a panic we're seeing in their internals.

In order to make this work, I've temporarily forked async-tls with:
https://github.com/async-rs/async-tls/pull/59/files

Closes #ISSUE

Release Notes:

- N/A
2025-02-03 12:31:42 -07:00