b4e1d86
git: Use UI font in commit and blame popovers (#43975)
Click to expand commit body
Closes #30353
Release Notes:
- Fixed: Hover tooltips in git commit and blame popovers now
consistently use the UI font
Mikhail Pertsev
created
8a12ecf
commit view: Display message within editor (#44024)
Click to expand commit body
#42441 moved the commit message out of the multi-buffer editor into its
own header element which looks nicer, but unfortunately can make the
view become unusable when the commit message is too long since it
doesn't scroll with the diff.
This PR maintains the metadata in its own element, but moves the commit
message back to the editor so the user can scroll past it. This does
mean that we lose markdown rendering for now, but we think this is a
good solution for the moment.
https://github.com/user-attachments/assets/d67cf22e-1a79-451a-932a-cdc8a65e43de
Release Notes:
- N/A
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Agus Zubiaga
and
cameron
created
22bf449
settings_ui: Fix some non-title case settings items (#44026)
Click to expand commit body
Release Notes:
- N/A
Danilo Leal
created
bcf9142
Update tree-sitter-bash to 0.25.1 (#44009)
Click to expand commit body
With the merging and publishing of
https://github.com/tree-sitter/tree-sitter-bash/pull/311 , we can now go
ahead and update the version of `tree-sitter-bash` that Zed relies on to
the latest version.
Closes #42091
Release Notes:
- Improved grammar for "Shell Script"
Dino
created
a2d57fc
zed_extension_api: Fork new version of extension API (#44025)
Click to expand commit body
This PR forks a new version of the `zed_extension_api` in preparation
for new changes.
We're jumping from v0.6.0 to v0.8.0 for the WIT because we released
v0.7.0 of the `zed_extension_api` without any WIT changes (it probably
should have been v0.6.1, instead).
Release Notes:
- N/A
Marshall Bowers
created
96a9170
Apply `show_completions_on_input: false` to word & snippet completions (#44021)
Click to expand commit body
Closes #43408
Previously, we checked the setting inside `is_completion_trigger()`,
which only affects LSP completions. This was ok because user-defined
snippets were tacked onto LSP completions. Then #42122 and #42398 made
snippet completions their own thing, similar to word completions,
surfacing #43408. This PR moves the settings check into
`open_or_update_completions_menu()` so it applies to all completions.
Release Notes:
- Fixed setting `show_completions_on_input: false` so that it affects
word and user-defined snippet completions as well as LSP completions
Andrew Farkas
created
a2ddb0f
Fix "busy" cursor appearing on startup (#44019)
23e5477
vim: Move to opening html tag from / in closing tag (#42513)
Click to expand commit body
Closes #41582
Release Notes:
- Improves the '%' vim motion for html by moving the cursor to the
opening tag when its positioned on the `/` ( slash ) of the closing tag
Pranav Joglekar
created
4e043cd
Add git team to git in REVIEWERS.conl (#41841)
Click to expand commit body
Release Notes:
- N/A
David Kleingeld
created
d283338
Add "File History" option to Git Panel entry context menu (#44016)
cargo-about@0.8.3 doesn't seem to like our license identifiers. Pinning
to 0.8.2 for now.
Release Notes:
- N/A
Agus Zubiaga
created
7bea1ba
Run commands if completion items require so (#44008)
Click to expand commit body
Abide the LSP better and actually run commands if completion items
request those:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem
```
/**
* An optional command that is executed *after* inserting this completion.
* *Note* that additional modifications to the current document should be
* described with the additionalTextEdits-property.
*/
command?: [Command](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#command);
```
Release Notes:
- N/A
Kirill Bulatov
created
7c95834
languages: Add injections to highlight script blocks of `actions/github-script` as JavaScript (#43771)
Click to expand commit body
Hello, this is my first time contributing here! The issue creation
button noted that "feature request"-esque items should go to
discussions, so with this PR, I'm closing that discussion and not an
issue. I hope that's ok :)
---
Closes https://github.com/zed-industries/zed/discussions/43769
Preview:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/00b8d475-d452-42e9-934b-ee5dbe48586e"
/><p/>
Release Notes:
- Added JavaScript highlighting via YAML `injections.scm` for script
blocks of `actions/github-script`
Novus Nota
created
3d58738
collab: Add action to copy room id (#44004)
Click to expand commit body
Adds a `collab: copy room id` action which copies the live kit room name
and session ID to the clipboard.
Release Notes:
- N/A
Agus Zubiaga
created
2db237a
Limit edit prediction reject batches to max (#43965)
Click to expand commit body
We currently attempt to flush all rejected predictions at once even if
we have accumulated more than
`MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST`. Instead, we will now flush
as many as possible, and then keep the rest for the next batch.
Release Notes:
- N/A
Agus Zubiaga
created
305e73e
gpui(windows): Move interior mutability down into fields (#44002)
Click to expand commit body
Windows applications tend to be fairly re-entrant which does not work
well with our current top-level `RefCell` approach. We have worked
around a bunch of panics in the past due to this, but ultimately this
will re-occur (and still does according to sentry) in the future. So
this PR moves all interior mutability down to the fields.
Fixes ZED-1HM
Fixes ZED-3SH
Fixes ZED-1YV
Fixes ZED-29S
Fixes ZED-29X
Fixes ZED-369
Fixes ZED-20W
Release Notes:
- Fixed panics on windows caused by unexpected re-entrancy for interior
mutability
Lukas Wirth
created
ec6e7b8
gpui(windows): Fix top resize edge being only 1px tall (#43995)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/41693
Release Notes:
- Fixed an issue on windows where the resize area on the title bar is
only 1px tall
Lukas Wirth
created
4f5cc0a
lsp: Send client process ID in LSP initialize request (#43988)
Click to expand commit body
Per the [LSP
specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeParams),
the client should send its process ID to the language server so the
server can monitor the client process and shut itself down if the client
exits unexpectedly.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/43328
Instead of trying to guess whether we can `--exec`, this now
restructures things to only attempt to use that flag where its
necessary. We only need to `--exec` when we are interested in the shell
output after all.
Release Notes:
- Fixed wsl remoting not working with some nixOS setups
Lukas Wirth
created
6a09729
terminal_view: Fix close tab button tooltip showing wrong keybinding on windows (#43981)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/43882
Release Notes:
- Fixed wrong button tooltips being shown for terminal pane on windows
Lukas Wirth
created
0df86e4
windows: Fix more vscode keybindings (#43983)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/43151 Closes
https://github.com/zed-industries/zed/issues/42022
Looking at other mappings, it seems like this should've been an alt
keybind after all
Release Notes:
- Fixed toggling focus to project panel via keybinding on windows not
always working
Lukas Wirth
created
a74aac8
Increase askpass timeout for git operations (#42946)
19aba43
Add Tailwind CSS support for Gleam (#43968)
Click to expand commit body
Currently, Zed does not provide suggestions and validations for Gleam,
as it is only available for languages specified in `tailwind.rs`. This
pull-request adds Gleam to that list of languages.
After this, if Tailwind is configured to work with Gleam, suggestions
and validation appear correctly.
Even after this change, Tailwind will not be able to detect and give
suggestions in Gleam directly. Below is the config required for Tailwind
classes to be detected in all Gleam strings.
<details><summary>Zed Config for Tailwind detection in Gleam</summary>
<p>
```
{
"languages": {
"Gleam": {
"language_servers": [
"gleam",
"tailwindcss-language-server"
]
}
},
"lsp": {
"tailwindcss-language-server": {
"settings": {
"experimental": {
"classRegex": [
"\"([^\"]*)\""
]
}
}
}
}
}
```
The `classRegex` will match all Gleam strings, making it work seamlessly
with Lustre templates and plain string literals.
</p>
</details>
Release Notes:
- Added support for Tailwind suggestions and validations for the [Gleam
programming language](https://gleam.run/).
Arjun Bajaj
created
8d09610
git_ui: Fix utf8 panic in `compress_commit_diff` (#43972)
f445f22
Add an action listener to workspace for ActivatePreviousItem and ActivateNextItem (#42588)
Click to expand commit body
Release Notes:
- pane::ActivatePreviousItem and pane::ActivateNextItem now toggle the
most recent pane when called from a dock panel
a couple months ago i posted a work around that used `SendKeystrokes` to
cycle through pane items when focused on a dock.
#35253
this pr would add this functionality to the these actions by default.
i implemented this by adding an action listener to the workspace level.
------
if the current context is a dock that does not hold a pane
it retrieves the most recent pane from `activation_history` and
activates the next item on that pane instead.
- `"Pane > Editor"`
cycles through the current pane like normal
- `"Dock > Pane > Terminal"`
also cycles through the pane items like normal
- `"Dock > (Any Child that is not a child of Pane)"`
cycles through the items of the most recent pane.
this is the standard behavior in VS Code i believe.
in the video below you can see the actions cycling through the editor
like normal when focus is on the editor.
then you can see the editor continue to cycle when the focus is on the
project panel.
and that the focus stays on the project panel.
and you can see the action cycle the terminal items when the focus is
moved to the terminal
https://github.com/user-attachments/assets/999ab740-d2fa-4d00-9e53-f7605217e6ac
the only thing i noticed is that for this to work the keybindings must
be set above `Pane`
so they have to be set globally or on workspace. otherwise they do not
match in the context
Josh Piasecki
created
6216af9
Allow dynamic `set_theme` based on `Appearance` (#42812)
Click to expand commit body
Tracking Issue (does not close):
https://github.com/zed-industries/zed/issues/35552
This is somewhat of a blocker for
https://github.com/zed-industries/zed/pull/40035 (but also the current
behavior doesn't really make sense).
The current behavior of `ThemeSelectorDelegate::set_theme` (the theme
selector menu) is to simply set the in-memory settings to `Static`,
regardless of if it is currently `Dynamic`. The reason this doesn't
matter now is that the `theme::set_theme` function that updates the
user's settings file _will_ make this check, so dynamic settings stay
dynamic in `settings.json`, but not in memory.
But this is also sort of strange, because `theme::set_theme` will set
the setting of whatever the old appearance was to the new theme name. In
other words, if I am currently on a light mode theme and I change my
theme to a dark mode theme using the theme selector, the `light` field
of `theme` in `settings.json` is set to a dark mode theme!
_I think this is because displaying the new theme in the theme selector
does not update the global context, so
`ThemeSettings::get_global(cx).theme.name(appearance).0` returns the
original theme appearance, not the new one._
---
This PR makes `ThemeSelectorDelegate::set_theme` keep the current
`ThemeSelection`, as well as changes the behavior of the
`theme::set_theme` call to always choose the correct setting to update.
One edge case that might be slightly strange now is that if the user has
specified the mode as `System`, this will now override that with the
appearance of the new theme. I think this is fine, as otherwise a user
might set a dark theme and nothing will change because the
`ThemeAppearanceMode` is set to `light` or `system` (where `system` is
also light).
I also have an `unreachable!` in there that I'm pretty sure is true but
I don't really know how to formally prove that...
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
This PR adds word/character diff for expanded diff hunks that have both
a deleted and added section, as well as a setting `word_diff_enabled` to
enable/disable word diffs per language.
- `word_diff_enabled`: Defaults to true. Whether or not expanded diff
hunks will show word diff highlights when they're able to.
### Preview
<img width="1502" height="430" alt="image"
src="https://github.com/user-attachments/assets/1a8d5b71-449e-44cd-bc87-d6b65bfca545"
/>
### Architecture
I had three architecture goals I wanted to have when adding word diff
support:
- Caching: We should only calculate word diffs once and save the result.
This is because calculating word diffs can be expensive, and Zed should
always be responsive.
- Don't block the main thread: Word diffs should be computed in the
background to prevent hanging Zed.
- Lazy calculation: We should calculate word diffs for buffers that are
not visible to a user.
To accomplish the three goals, word diffs are computed as a part of
`BufferDiff` diff hunk processing because it happens on a background
thread, is cached until the file is edited, and is only refreshed for
open buffers.
My original implementation calculated word diffs every frame in the
Editor element. This had the benefit of lazy evaluation because it only
calculated visible frames, but it didn't have caching for the
calculations, and the code wasn't organized. Because the hunk
calculations would happen in two separate places instead of just
`BufferDiff`. Finally, it always happened on the main thread because it
was during the `EditorElement` layout phase.
I used Zed's
[`diff_internal`](https://github.com/zed-industries/zed/blob/02b2aa6c50c03d3005bec2effbc9f87161fbb1e8/crates/language/src/text_diff.rs#L230-L267)
as a starting place for word diff calculations because it uses
`Imara_diff` behind the scenes and already has language-specific
support.
#### Future Improvements
In the future, we could add `AST` based word diff highlights, e.g.
https://github.com/zed-industries/zed/pull/43691.
Release Notes:
- git: Show word diff highlight in expanded diff hunks with less than 5
lines.
- git: Add `word_diff_enabled` as a language setting that defaults to
true.
---------
Co-authored-by: David Kleingeld <davidsk@zed.dev>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Anthony Eid
,
David Kleingeld
,
Cole Miller
,
cameron
, and
Lukas Wirth
created
2df5993
workspace: Add `ctrl-w x` support for vim (#42792)
Click to expand commit body
Adds support for the vim CTRL-W x keybinding, which swaps the active
pane with the next adjacent one, prioritizing column over row and next
over previous. Upon swap, the pane which was swapped with is activated
(this is the vim behavior).
See also
https://github.com/vim/vim/blob/ca6a260ef1a4b4ae94bc71c17cbabf8f12bf0f8c/runtime/doc/windows.txt#L514C1-L521C24
Release Notes:
- Added ctrl-w x keybinding in Vim mode, which swaps the active window
with the next adjacent one (aligning with Vim behavior)
**Vim behavior**
https://github.com/user-attachments/assets/435a8b52-5d1c-4d4b-964e-4f0f3c9aca31
https://github.com/user-attachments/assets/7aa40014-1eac-4cce-858f-516cd06d13f6
**Zed behavior**
https://github.com/user-attachments/assets/2431e860-4e11-45c6-a3f2-08f1a9b610c1
https://github.com/user-attachments/assets/30432d9d-5db1-4650-af30-232b1340229c
Note: There is a discrepancy where in Vim, if vertical and horizontal
splits are mixed, swapping from a column with a single window does not
work (see the vertical video), whilst in Zed it does. However, I don't
see a good reason as to why this should not be supported and would argue
that it makes more sense to keep the clear priority swap behavior,
instead of adding a workaround to supports such cases.
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Moritz Fröhlich
and
Conrad Irwin
created
04e92fb
vim: Fix :s command ignoring case sensitivity settings (#42457)
Click to expand commit body
Closes #36260
This PR fixes the vim :s Command Ignores Case Sensitivity Settings
Release Notes:
- N/A
Hans
created
e275904
Actually show settings errors on app load (#43268)
Click to expand commit body
They were previously hidden by the global settings file succeeding to
parse :face-palm:
Release Notes:
- N/A
Conrad Irwin
created
a675eb1
Fix regression in closing project diff (#43964)
Click to expand commit body
Follow-up to #43586--when the diff is not split, just render the primary
editor. Otherwise the child `Pane` intercepts `CloseActiveItem`. (This
is still a bug for the actual split diff, but just fixing the
user-visible regression for now.)
Release Notes:
- N/A
Cole Miller
created
b27ad98
zeta: Put back 15s reject debounce (#43958)
Click to expand commit body
Release Notes:
- N/A
Agus Zubiaga
created
9c4e160
extension_ci: Use more robust bash syntax for `bump_extension_version` (#43955)
Click to expand commit body
Also does some more cleanup here and there.
Release Notes:
- N/A
Finn Evers
created
34a2bfd
ci: Supply `github_token` to `bufbuild_setup_action` (#43957)
Click to expand commit body
This should hopefully resolve errors like
https://github.com/zed-industries/zed/actions/runs/19839788214/job/56845583441
Release Notes:
- N/A
bd79ede
extension_ci: Improve behavior when no Rust is present (#43953)
Click to expand commit body
Release Notes:
- N/A
Finn Evers
created
0bb1c6a
Return json value instead of empty string from accept/reject endpoints
Agus Zubiaga
created
fd14675
Add Doxygen injection into C and C++ comments (#43581)
Click to expand commit body
Release Notes:
- C/C++ files now support Doxygen grammars (if a Doxygen extension is installed).
Clément Lap
created
6eb9f9a
Debug a test annotated with the ignore attribute if the test name partially matches another test (#43110)
Click to expand commit body
Related: #42574
If an integration test is annotated with the ignore attribute, allow the
"debug: Test" option of the debug scenario or Code Action to run with
the "--include-ignored" and "--exact" arguments. Inclusion of "--exact"
covers the case where more that one test shares a base name. For
example, consider two tests named "test_no_ace_in_middle_of_straight"
and "test_no_ace_in_middle_of_straight_flush." Without the "--exact"
argument both tests would run if a user attempts to debug
"test_no_ace_in_middle_of_straight".
Release Notes:
- Improved "debug test" experience in Rust with ignored tests.
1535e95
ci: Always run nextest for extensions (#43945)
Click to expand commit body
This makes rolling this out across extensions a far bit easier and also
safer, because we don't have to manually set `run_tests` for every
extension (and never have to consider this when updating these).
Release Notes:
- N/A
Finn Evers
created
26f7703
edit prediction: Do not attempt to gather context for non-zeta2 models (#43943)
Click to expand commit body
We were running the LLM-based context gathering for zeta1 and sweep
which don't use it.
Release Notes:
- N/A
We were allowing the client to build up to
`MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST`. We'll now attempt to flush
the rejections when we reach half max.
Release Notes:
- N/A