7d97855
Use AppContext for UI font adjustments (#17858)
Click to expand commit body
Appologies if this PR is off base, I'm still not super familiar with the
Zed codebase.
I was trying to integrate with
https://github.com/zed-industries/zed/pull/12940
and found it awkward to hook up global bindings to adjust the UI font
size due to the fact it takes a WindowContext. Looking at the API, it
seemed odd that it took a WindowContext, yet the editor font methods
take an AppContext.
I couldn't find a compelling reason for this to be tied to a
WindowContext, so I personally think it makes sense to switch it.
This does have a behavior change, which hopefully is actually desirable:
Currently, if you have two open and visible Zed windows, and trigger a
UI font adjustment in one, the non-active windows won't update. However,
once you switch focus to the second one it will snap to the new UI font
size. This is inconsistent with adjusting the editor font size, which
applies to all open windows immediately.
Release Notes:
- N/A
Galen Elias
created
4160824
Update Rust crate rodio to 0.19.0 (#17389)
Click to expand commit body
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [rodio](https://redirect.github.com/RustAudio/rodio) | dependencies |
minor | `0.17.1` -> `0.19.0` |
---
### Release Notes
<details>
<summary>RustAudio/rodio (rodio)</summary>
###
[`v0.19.0`](https://redirect.github.com/RustAudio/rodio/blob/HEAD/CHANGELOG.md#Version-0190-2024-06-29)
[Compare
Source](https://redirect.github.com/RustAudio/rodio/compare/v0.18.1...v0.19.0)
##### Added
- Adds a new source `track_position`. It keeps track of duration since
the
beginning of the underlying source.
##### Fixed
- Mp4a with decodable tracks after undecodable tracks now play. This
matches
VLC's behaviour.
###
[`v0.18.1`](https://redirect.github.com/RustAudio/rodio/blob/HEAD/CHANGELOG.md#Version-0181-2024-05-23)
[Compare
Source](https://redirect.github.com/RustAudio/rodio/compare/v0.18.0...v0.18.1)
##### Fixed
- Seek no longer hangs if the sink is empty.
###
[`v0.18.0`](https://redirect.github.com/RustAudio/rodio/blob/HEAD/CHANGELOG.md#Version-0180-2024-05-05)
[Compare
Source](https://redirect.github.com/RustAudio/rodio/compare/v0.17.3...v0.18.0)
##### Changed
- `Source` trait is now also implemented for `Box<dyn Source>` and `&mut
Source`
- `fn new_vorbis` is now also available when the `symphonia-vorbis`
feature is enabled
##### Added
- Adds a new method `try_seek` to all sources. It returns either an
error or
seeks to the given position. A few sources are "unsupported" they return
the
error `Unsupported`.
- Adds `SpatialSink::clear()` bringing it in line with `Sink`
##### Fixed
- channel upscaling now follows the 'WAVEFORMATEXTENSIBLE' format and no
longer
repeats the last source channel on all extra output channels.
Stereo content playing on a 5.1 speaker set will now only use the front
left
and front right speaker instead of repeating the right sample on all
speakers
except the front left one.
- `mp3::is_mp3()` no longer changes the position in the stream when the
stream
is mp3
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Tests on main started breaking following
https://github.com/zed-industries/zed/commit/bc5ed1334ff019e026cbf7a6bbad4a8c2c5d68df
from:
- https://github.com/zed-industries/zed/pull/17734
First breakage:
https://github.com/zed-industries/zed/actions/runs/10894059586/job/30230118999
Peter Tripp
created
a141415
Add `cursor_shape` setting for the default editor (#17572)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/16451,
https://github.com/zed-industries/zed/issues/14447,
https://github.com/zed-industries/zed/issues/7203
Addresses but does not closes
https://github.com/zed-industries/zed/issues/5179
Expose cursor shape selection to users. Possibly controversial, since
block cursor seems preserved for vim and terminal. But the heart wants
what it wants?
Release Notes:
- Added a setting for `cursor_shape`. Can be `bar`, `block`,
`underline`, or `hollow`. Default is `bar`.
thataboy
created
d315405
Return completion proposals from inline completion providers (#17578)
Click to expand commit body
Updates the inline completion provider to return a completion proposal
which is then converted to a completion state. This completion proposal
includes more detailed information about which inlays specifically
should be rendered.
Release Notes:
- Added support for fill-in-the-middle style inline completions

Kevin Wang
created
37b2f4b
Wrap terminal commands in single quotation marks instead of backticks (#17637)
Click to expand commit body
before:

after:

Since I often copy the output commands to run in the command line, using
backticks can cause errors because, in shell, backticks mean passing the
execution result of the command inside them to the -c option. Therefore,
I replace backticks with single quotes here.

Release Notes:
- Fix display of task commands to not use backticks
Signed-off-by: bestgopher <84328409@qq.com>
bestgopher
created
4441150
Add missing Void Linux dependencies (#17827)
Click to expand commit body
Release Notes:
- N/A
Bai
created
d7c45cc
x11: Fix preedit for CJK and partially fix unresponsive keyboard with xim (#17373)
Click to expand commit body
Closes #15833
Related to [#12495
comment](https://github.com/zed-industries/zed/pull/12495#issuecomment-2328356125)
Destroying and recreating the Input context was the only way to reset
the IME but it's making the keyboard unresponsive sometimes due to a XIM
error.
The keyboard will still be unresponsive if you close your IME while
using zed, but I don't know how to fix this.
* Fixed preedit drawing for CJK
* Fixed unresponsive keyboard by properly implementing reset_ic in
`xim-rs`
Release Notes:
- N/A
Fernando Tagawa
created
bc5ed13
Upgrade tree sitter and all grammars (#17734)
Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/5291
Release Notes:
- Fixed a bug where the 'toggle comments' command didn't use the right
comment syntax in JSX and TSX elements.
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Max Brunsfeld
,
Conrad
,
Conrad Irwin
, and
Kirill Bulatov
created
This PR adds a rewrap command to the editor.
Executing this command will rewrap the text in the selection to the
maximum line width:
https://github.com/user-attachments/assets/69aa9428-17fd-4315-89f1-f354d0f5f459
If there isn't an active selection, the selection will be expanded to
contiguous text from the cursor's location.
Rewrapping only works in Markdown, Plain Text, and within comments for
any other language.
Release Notes:
- Added an `editor: rewrap` command for rewrapping text to the maximum
line width.
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Bennet <bennet@zed.dev>
Marshall Bowers
,
Antonio Scandurra
, and
Bennet
created
e7d18ef
See language server status on remote (#17912)
Click to expand commit body
Release Notes:
- ssh-remoting: Show LSP status in status bar
Co-authored-by: Mikayla <mikayla@zed.dev>
Conrad Irwin
and
Mikayla
created
243629c
Fix keystroke observer leak in vim crate (#17913)
Click to expand commit body
Release Notes:
- Fixed a performance problem that happened when using vim mode after
opening and closing many editors
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Max Brunsfeld
,
Antonio
, and
Nathan
created
67f149a
Ollama: Specify keep_alive via settings (#17906)
Peter Tripp
created
e66ea9e
Fix renames over language server for SSH remoting (#17897)
Click to expand commit body
Release Notes:
- ssh remoting: Fix rename over language server
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Max <max@zed.dev>
Conrad Irwin
,
Mikayla
, and
Max
created
01bb10f
Move ProtoClient to RPC crate, behind feature flag disabled in collab (#17908)
Click to expand commit body
This fixes a bug where we accidentally added a `gpui` transitive
dependency in `collab`.
Release Notes:
- N/A
dea8509
collab: Override Cargo configuration in the `Dockerfile` (#17901)
Click to expand commit body
This PR moves the override for the Cargo configuration for collab into
the `Dockerfile` rather than having it be something some in the external
environment.
This makes it possible to build the Docker image locally without having
to replace `.cargo/config.toml` with the contents of
`.cargo/collab-config.toml`.
Release Notes:
- N/A
Marshall Bowers
created
b48c2c5
Update comment to point to culpable commit (#17896)
Click to expand commit body
This PR updates the comment added in #17893 to reference the commit that
was identified by `git bisect`.
Release Notes:
- N/A
Marshall Bowers
created
f376932
collab: Mark RunPod environment variables as optional in Kubernetes template (#17895)
Click to expand commit body
This PR marks the RunPod environment variables as optional in the
Kubernetes template so that we can deploy without them being present.
Collab is already accounting for their absence.
Release Notes:
- N/A
Marshall Bowers
created
2c9d076
rust: Lookup rust-analyzer on PATH by default (#17885)
Click to expand commit body
This is a highly and frequently requested change. Users are confused why
rust-analyzer isn't used if it's on their `$PATH`.
Previously I didn't enable this by default, because rust-analyzer would
complain about an "Unknown binary", like this
Unknown binary 'rust-analyzer' in official toolchain
'1.81-aarch64-apple-darwin'.\n
But turns out that only happens when you have installed rust-analyzer
via the rustup toolchain, it's in your `$PATH`, and the
`rust-toolchain.toml` of the repository doesn't mention it.
The fix is to delete `~/.cargo/bin/rust-analyzer` and, if preferred, use
`rust-analyzer` by installing the binary manually.
Release Notes:
- Changed rust-analyzer support to lookup `rust-analyzer` binaries by
default in `$PATH`. That changes the default value to something users
requested.
Thorsten Ball
created
784c309
Remove incorrect documentation for language-specific theme overrides (#17894)
Click to expand commit body
Zed does not support this, the documentation was added in error. And if it were supported, the key would be `experimental.theme_overrides` not `theme_overrides`.
Peter Tripp
created
ba5c132
collab: Add missing dependencies for building Docker image (#17893)
Click to expand commit body
This PR adds some missing dependencies to the Docker image that are now
needed in order to build collab.
When trying to build the docker image at
761129e3739efacb7b8763eaa0fa8a109e935447 it fails with the following
error:
```
985.3 = note: /usr/bin/ld: cannot find -lxkbcommon: No such file or directory
985.3 /usr/bin/ld: cannot find -lxkbcommon-x11: No such file or directory
985.3 collect2: error: ld returned 1 exit status
985.3
985.3
985.4 error: could not compile `collab` (bin "collab") due to 1 previous error
```
The last time we built the Docker image for collab was:
- Staging: 4f408ec65a3867278322a189b4eb20f1ab51f508
- Production: fc4c533d0a8c489e5636a4249d2b52a80039fbd7
Release Notes:
- N/A
Marshall Bowers
created
28fb1fd
Regenerate terms.rtf fixing Privacy Policy link (#17877)
Peter Tripp
created
90b77e1
Don't show extra row in toolbar if it is empty (#17888)
Click to expand commit body
Closes #17851
Release Notes:
- Removed an extra row in the toolbar if it was empty.
Previous `release_nightly` workflow would trigger every night or on push
to the `nightly` tag, which means `nightly` tag wasn't always in sync
with the nightly we bundle. This change syncs the tag up with the
bundled releases.
Release Notes:
- N/A
jvmncs
created
22db569
docs: Use `json` to fix syntax highlighting (#17884)
Click to expand commit body
This follows up the [issue with mdbook notpeter
mentioned](https://github.com/zed-industries/zed/pull/17864#issuecomment-2353089065)
by replacing `jsonc` where used in the docs with `json`.
Additionally, one missing `json` - highlight was added for the
search-section.
Release Notes:
- N/A
Enable configuring Dart's LSP from other means of installation types.
Some users don't install the `dart` binary, but uses version manager.
In the example, I uses [FVM](https://fvm.app/) (short for "Flutter
Version Manager").
I have tested this with "Install Dev Extensions".
Release Notes:
- N/A
cc other maintainer: @agent3bood @flo80
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Yohanes Bandung Bondowoso
and
Marshall Bowers
created
2baa704
Clamp `tab_size` setting between 1 and 16 (#17882)
Click to expand commit body
Release Notes:
- Changed `tab_size` setting to require values be between 1 and 16
(inclusive).
### jetbrains settings
#### Max value

When the maximum value is exceeded, the configuration box turns red to
remind the user

If the user still saves, jetbrains does not process it and resets it to
the system default value of 4
<img width="700" alt="image"
src="https://github.com/user-attachments/assets/a76b1cba-d23f-4a32-95ee-f05d208ca186">
Without restrictions, I feel not good. Here is a random setting of a
relatively large value
https://github.com/user-attachments/assets/c3bdf262-ba08-4bc2-996a-5ad2a37c567f
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
ihavecoke
and
Marshall Bowers
created
e3d54b2
vim: Fix ctrl-b not moving the cursor (#17808)
Click to expand commit body
Closes #17687
Release Notes:
- Fixed `ctrl-b` not moving the cursor.
---------
Co-authored-by: Abdelhakim Qbaich <abdelhakim@qbaich.com>
Co-authored-by: Pete LeVasseur <plevasseur@gmail.com>
Thorsten Ball
,
Abdelhakim Qbaich
, and
Pete LeVasseur
created
This PR adds "Open Settings" and "Open Docs" to the welcome page, as
well as some minor design polish.
The welcome page needs a full redesign at some point so I didn't too to
much here in terms of structure/content.
Before | After:

---
Release Notes:
- Improved welcome page design and added additional links.
Nate Butler
created
4e1bb68
Use buffer font for the inline assistant (#17875)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/17738
This PR is motivated by having also noticed what the issue above
mentions. Looked it further and it does seem the inline assistant had a
slightly bigger font-size even though it was using the configured UI
font-size as per https://github.com/zed-industries/zed/pull/17542. I'm
not sure why that was, technically speaking. However, I ended up
realizing that, given we're within the editor, it'd make more sense to
use the buffer font instead. With this change, the size mismatch seems
to be gone.
<img width="900" alt="Screenshot 2024-09-16 at 2 13 28 PM"
src="https://github.com/user-attachments/assets/fe2f3096-d5dd-4986-ba96-f2ca7578d84d">
Release Notes:
- N/A
Danilo Leal
created
96a5daa
Refine symbolic link project tooltip (#17869)
Click to expand commit body
This PR uses the tooltip with meta to display the info that a project
panel item is actually a symbolic link.
| Before | After |
|--------|--------|
| <img width="826" alt="Screenshot 2024-09-16 at 11 20 15 AM"
src="https://github.com/user-attachments/assets/7823f1f2-ed92-4b9a-b95e-c0777cb32387">
| <img width="638" alt="Screenshot 2024-09-16 at 11 19 12 AM"
src="https://github.com/user-attachments/assets/5d441ba5-6741-482c-bf2a-ec7e172953df">
|
Release Notes:
- N/A
This PR does a little bit of a touch-up on the copywriting on the
assistant config UI. I had friends reporting to me that some of the
writing could be clearer, and hopefully, this goes into that direction!
Release Notes:
- N/A
I'm not sure if I placed `Network Proxy` in the correct position. What I
noticed is that the first half of the documentation seems to be
organized alphabetically, but the second half is not. I tried to
position `Network Proxy` in a spot that seemed reasonable while
maintaining alphabetical order. If there's a better suggestion, I'd be
happy to make adjustments.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Junkui Zhang
and
Marshall Bowers
created
40a00fb
Add missing operators and keywords to the C syntax highlighting (#17541)
Click to expand commit body
Based on https://en.cppreference.com/w/c/language/expressions#Operators
Release Notes:
- Added missing operators and keywords to the C syntax highlighting
krizej
created
00c0a72
gpui: Allow TextInput example to lose and gain focus (#17823)
Click to expand commit body
Improved the input.rs example file in gpui crate.
The new code
* allow this text field to lose and gain input focus.
* change TextInput's height from full to fix.
Release Notes:
- N/A
Zhang
created
4d8c385
theme: Clamp font sizes between 6px and 100px (#17829)
Click to expand commit body
This PR clamps the `ui_font_size` and `buffer_font_size` settings
between 6px and 100px.
Release Notes:
- Changed `ui_font_size` and `buffer_font_size` to require values to be
between 6px and 100px (inclusive).
This PR improves adding and working with icons by using the new
`DerivePathStr` to derive icon paths.
This means paths no longer need to be manually specified, and the
`IconName` and file name will always be consistent between icons.
This PR does not do any work to standardize icons visually, remove
unused icons, or any other such cleanup.
Release Notes:
- N/A
Nate Butler
created
ce84837
add `ui::Vector` and separate images from icons (#17815)
Click to expand commit body
This PR pulls non-icon assets out of `ui::components::icon` in
preparation for icon standardization.
In the future icons will have standard names and sizes, and these image
assets won't conform to those constraints.
We can also add a `ui::components::image::Image` wrapper around the
`gpui::img` element in the future for any Zed-specific image styling we
want to enforce.
Of note:
```rust
#[derive(Debug, PartialEq, Eq, Copy, Clone, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize, DerivePathStr)]
#[strum(serialize_all = "snake_case")]
#[path_str(prefix = "images", suffix = ".svg")]
pub enum VectorName {
ZedLogo,
ZedXCopilot,
}
```
You can see in the above code we no longer need to manually specify
paths for image/icon enums like we currently do in
`ui::components::icon`.
The icon component will get this same treatment in the future, once we:
- do the design work needed to standardize the icons
- remove unused icons
- update icon names
Release Notes:
- N/A
This PR adds the `ui_macros` crate to allow building supporting macros
for the `ui` crate.
Additionally, it implements the `DerivePathStr` derive macro and the
`path_str` attribute macro. These macros work together to generate a
`path` method for enum variants, which is useful for creating
standardized string representations of enum variants.
The `DerivePathStr` macro provides the following functionality:
- Generates a `path` method for each enum variant.
- Allows specifying a prefix (required) and suffix (optional) for all
paths.
- Supports `strum` attributes for case conversion (e.g., snake_case,
lowercase).
Usage example:
```rust
#[derive(DerivePathStr)]
#[path_str(prefix = "my_prefix", suffix = ".txt")]
#[strum(serialize_all = "snake_case")]
enum MyEnum {
VariantOne,
VariantTwo,
}
// Generated paths:
// MyEnum::VariantOne.path() -> "my_prefix/variant_one.txt"
// MyEnum::VariantTwo.path() -> "my_prefix/variant_two.txt"
```
In a later PR this will be used to automate the creation of icon & image
paths in the `ui` crate.
This gives the following benefits:
1. Ensures standard naming of assets as paths are not manually
specified.
2. Makes adding new enum variants less tedious and error-prone.
3. Quickly catches missing or incorrect paths during compilation.
3. Adds a building block towards being able to lint for unused assets in
the future.
Release Notes:
- N/A
Nate Butler
created
d245f5e
OpenAI o1-preview and o1-mini support (#17796)
Click to expand commit body
Release Notes:
- Added support for OpenAI o1-mini and o1-preview models.
---------
Co-authored-by: Jason Mancuso <7891333+jvmncs@users.noreply.github.com>
Co-authored-by: Bennet <bennet@zed.dev>
Peter Tripp
,
Jason Mancuso
, and
Bennet
created
e145c13
Add stray UI polish to the SSH flow (#17798)
Click to expand commit body
Some super subtle refinement opportunities I spotted while playing
around with this flow. There are mostly copywriting tweaks and some UI
tweaks here and there (including editing the modal horizontal padding).
---
Release Notes:
- N/A