Adds a text property for controlling left, center, or right text
alignment.
#8792 should stay open since this doesn't add support for `justify`
(which would require a much bigger change since this can just alter the
origin of each line, but justify requires changing spacing, whereas
justify requires changes to each platform's shaping code).
Release Notes:
- N/A
Sorry to dump an unsolicited PR for a hot feature! I'm sure someone else
was taking a look at this.
I noticed that token counting was disabled and I was getting error logs
of the form `[2025-01-31T22:59:01-05:00 ERROR assistant_context_editor]
No tokenizer found for model o3-mini` when using the new model. To fix
the issue, this PR registers the `gpt-4` tokenizer for this model.
Release Notes:
- openai: Fixed Assistant token counts for `o3-mini` models
Closes#23334
This does not follow the exact way that windows are resized in vim.
Normally the command is `ctrl-w >` however this PR uses just `ctrl->`.
This is because I could not find a good way to read in a count like `10
ctrl-w ctrl->`. This is not really a problem since `ctrl->` can be held
down, which, in my opinion, speeds up resizing. I think this is a good
compromise since it improves usability; however, I am concerned that
this is not intuitive. I am looking forward to feedback.
Release Notes:
- Added the following commands
- vim::ResizeLeftDock
- vim::ResizeRightDock
- vim::ResizeBottomDock
- Added keybinds
- `ctrl->` for widening left dock
- `ctrl-<` for narrowing left dock
- Removes flakey keybindings from buttons
- Moves git panel entries to use a standard ListItem
- Show a repo selector in the panel when more than one repo is present
- Remove temporary repo selector from title bar
Release Notes:
- N/A
This PR removes the `em_width` and `em_advance` parameters to
`EditorSnapshot::gutter_dimensions` in favor of computing the values
inside of it.
In practice all of the callers were passing in the same values, and
there isn't a circumstance where we would want to pass in different
values.
`gutter_dimensions` has also been modified to return
`Option<GutterDimensions>` instead of `GutterDimensions` so that we can
remove some `.unwrap`s when interacting with the text system.
Release Notes:
- N/A
Follow-up of https://github.com/zed-industries/zed/pull/23869
* Retrieves user + email for collab project clients and use these when
such users commit
Same as in https://github.com/zed-industries/zed/pull/23329, "is it the
right user name and e-mail" and "how to override these" questions apply.
* If this data is unavailable, forbid committing to the remote client
* Forbid running related actions in git panel, if committing/writing is
not permitted
Release Notes:
- N/A
This PR adds a new `wait_for_flag_or_timeout` method to the
`FeatureFlagAppExt` trait.
This encapsulates the somewhat gnarly code for using `wait_for_flag`
with a timeout.
A side benefit of this is that the tasks waiting on the feature flags
run in parallel, so in the case where the feature flags do not resolve
we don't end up having to wait on consecutive timeouts. This should help
a bit with https://github.com/zed-industries/zed/issues/23922.
Release Notes:
- N/A
This PR changes the `ContextStore` constructor to not block on reloading
the contexts before we finish initializing it.
I noticed that the Assistant panel was taking a long time to show up in
the status bar, and upon further investigation uncovered that with a
large number of contexts (I have ~320) it takes a long time to load them
all.
Release Notes:
- N/A
A preparation for collaborative commit message editing.
Before, almost any `.git`-contained file FS update, except
`.git/fsmonitor--daemon/cookies/**` caused git metadata rescan.
This included `index.lock` that was created after any git operation,
e.g. `git status`, which was unnecessary.
Collaborative editing aims to share `.git/COMMIT_EDITMSG` between
multiple users, so there are potentially multiple users editing the file
and causing excessive events.
The change makes worktree to ignore .git/COMMIT_EDITMSG`,
`.git/index.lock` and `.git/fsmonitor--daemon/**` paths and adjusts the
logic to be more extensible: there's much more files Zed can ignore and
still have its git metadata up to date.
Release Notes:
- N/A
This PR updates function signatures, docstrings, and gpui's other
documentation to reflect it's new state following the merge of `Model`
and `View` into `Entity` as well as the removal of `WindowContext`.
Release Notes:
- N/A
Closes#23906
Note: Changes the focused pane when search UI is interacted with on an
unfocused pane rather than leaving the focused pane unchanged as
focusing on click is more likely to be the expected behavior
Release Notes:
- Fixes an issue with search actions so that they now execute on the
clicked pane rather than the focused pane when using search UI in
multiple panes
This PR adds two helpers methods to the `TextSystem`:
- `em_width`
- `em_advance`
These methods return the width and advance width for an `em`,
respectively.
We were using these definitions in a number of different spots, and by
unifying them we better canonicalize that an `em` is based on the `m`
character.
Release Notes:
- N/A
After the user confirmation, only the current instance of the
completions provider had the answer stored.
In this PR, the changes are propagated by having each provider have an
`Entity<choice>`, and having a lookup map with one `Entity<choice>` for
each worktree that `Zeta` has seen.
Release Notes:
- N/A
Closes#23877
Co-Authored-By: Ben <ben@zed.dev>
Co-Authored-By: Michael <michael@zed.dev>
Release Notes:
- vim: Fix navigating to end of line with inlay hints
---------
Co-authored-by: Ben <ben@zed.dev>
Co-authored-by: Michael <michael@zed.dev>
This PR removes the `POST /predict_edits` endpoint from the LLM service,
as it has been superseded by the corresponding endpoint running in
Cloudflare Workers.
All traffic is already being routed to the Cloudflare Workers via the
Workers route, so nothing is hitting this endpoint running in the LLM
service anymore.
You can see the drop off in requests to this endpoint on this graph when
the Workers route was added:
<img width="472" alt="Screenshot 2025-01-30 at 9 18 04 PM"
src="https://github.com/user-attachments/assets/fa60f7c8-2737-4329-88a3-17093bdb5a29"
/>
We also don't use the `fireworks` crate anymore in this repo, so it has
been removed.
Release Notes:
- N/A
This PR changes the edit predictions URL for Zed Staff back to
`llm.zed.dev/predict_edits`.
This endpoint is now being routed to the Cloudflare Workers instead of
the LLM service.
Release Notes:
- N/A
This PR makes it so when you install an extension with icon themes it
will deploy the icon theme selector filtered down to the newly-installed
icon themes.
This is similar to what we do when installing an extension with themes.
Because we can only have one picker open at a time, when installing an
extension that has _both_ themes and icon themes, the theme selector
will take precedence.
Release Notes:
- N/A
This PR adds a `schema_generator` crate that can be used to generate our
various JSON schemas for publishing elsewhere.
Currently it does the simplest thing possible and just prints the JSON
schema to stdout. We can make this a but more robust later.
I also removed the schema-printing facilities from the `theme_importer`,
as they don't really make sense there.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/23981
Release Notes:
- Fixed a crash that could happen when expanding certain diff hunks
- Fixed a bug where diff hunks were not syntax highlighted when
reopening a project with previously-opened buffers.
GPUI applications can set the window class by the `app_id` window
option. However, GPUI will map the window first and then change the
window class after the window is displayed. This doesn't work on some
X11 window managers. FVWM, for example, does not track window class
after a window is mapped. Because in practice, a window shouldn't change
its application group on the fly.
This PR fixed this by adding a `map_window()` function `PlatformWindow`.
On X11, it will `set_app_id()` first and then map the window.
Release Notes:
- N/A
Previously, editor elements had to listen for mouse_up events to
determine when a click had completed. This meant that they only had
access to modifier keys that were pressed during the mouse_up event.
This led to some incorrect user experiences, such as executing a
ctrl+click if the user pressed ctrl after pressing the mouse button, but
before releasing it.
This change adds a click event handler to EditorElement, and adds a
modifier() method to the ClickEvent, which only includes the modifier
keys that were pressed during both mouse down and mouse up. The code for
handling link clicks has been moved into the click event handler, so
that it's only triggered when the non-multi-cursor modifier was held for
both the mouse down and mouse up events.
Closes#12752, #16074, #17892 (the latter two seem to be duplicates of
the former!)
Release Notes:
- Fixed a bug where pressing ctrl/cmd (or other modifiers) after mouse
down but before mouse up still triggered ctrl/cmd+click behavior (e.g.
"go to definition")
This PR adds support for icon themes.
Closes https://github.com/zed-industries/zed/issues/8843.
Here is Zed with Material Icons:
<img width="1136" alt="Screenshot 2025-01-30 at 7 02 06 PM"
src="https://github.com/user-attachments/assets/57d8a0e0-ff38-44d9-8628-af58a60a7c9a"
/>
### Extensions
Extensions can provide icon themes as well as the icons used in those
themes.
Icon themes are defined as JSON files in the `icon_themes` directory,
and icons included in the `icons` directory will be packaged up with the
extension.
All icon paths within an icon theme are interpreted relative to the root
of the extension.
See the [Material Icon
Theme](https://github.com/zed-extensions/material-icon-theme) extension
for an example.
Release Notes:
- Added support for icon themes.
- Extensions can now provide icon themes.
- Use the `icon theme selector: toggle` action to switch between
installed icon themes.
This PR fixes an issue where we weren't properly resolving directory and
chevron icons from icon themes the way we were for file icons.
We need to interpret the icon paths as relative to the extension
directory.
Release Notes:
- N/A
Realized that the logic in #23814 was more than needed, and harder to
maintain. Something like that could make sense if using the tokenizer
and wanting to precisely hit a token limit. However in the case of edit
predictions it's more of a latency+expense vs capability tradeoff, and
so such precision is unnecessary.
Happily this change didn't require much extra work, just copy-modifying
parts of that change was sufficient.
Release Notes:
- N/A