Commit log

2dee4f8 windows: Fix title bar font for Windows 10 (#13425)

Click to expand commit body
This should fix the title bar font for Windows 10 as `Segoe Fluent
Icons` is only for Windows 11 and Windows 10 should be using `Segoe MDL2
Assets`, I haven't tested this myself on a Windows 10 machine but the
fonts work fine.

Release Notes:

- N/A

Matin Aniss created

54afa6f Bump image crate (#13397)

Click to expand commit body
Bumping the image crate for better support of image formats.

The latest version does not have a `BGRA` type it only has `RGBA` it
doesn't really matter as the size is the same but the type name is a
little confusing as we need it as `BGRA`. Also there is no `into_bgra8`
but we can use `into_rgba8` but then it must be converted before
creating the `ImageData`.

Release Notes:

- N/A

Matin Aniss created

55511d1 JSON: Show package.json dependency tooltips on hover (#13481)

Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/13303

Release Notes:

- Added package version tooltips when hovering over package.json
dependency entries.

Piotr Osiewicz created

6c0cb9e project panel: Respect y offset of a click-and-drag on a scrollbar (#13506)

Click to expand commit body
Previously we've always snapped the scrollbar to the cursor position,
without regard for the position of the thumb.



Release Notes:

- N/A

Piotr Osiewicz created

24e7b69 Rust: fix module names not showing in completion list (#13505)

Click to expand commit body
This is a regression from
https://github.com/zed-industries/zed/issues/13043

Fixes https://github.com/zed-industries/zed/issues/13494



Release Notes:

- Fix crate names not being shown in Rust completions menu.

Piotr Osiewicz created

a4cdca5 Refine UX for assistants (#13502)

Click to expand commit body
<img width="1652" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/376d1915-1e15-4d6c-966e-48f55f7cb249">


Release Notes:

- N/A

Antonio Scandurra created

86cd87e indent guides: Fix edge case when line is folded (#13498)

Click to expand commit body
https://github.com/zed-industries/zed/assets/53836821/6c79cdc8-c0e1-4f5e-807e-be4a4bde32c3



Release Notes:

- Fixed an edge case where some indent guides would disappear when a
folded line is the first visible line on screen

Bennet Bo Fenner created

88000eb Fix bug with inline assist and indentation on empty lines (#13489)

Click to expand commit body
Fix a minor bug when the inline assistant model spits out an empty line
with leading indentation on it. This happens sometimes with Claude 3.5
Sonnet and currently it causes the following line to have the wrong
indentation.

Release Notes:

- N/A

Tristan Hume created

ab5a462 Use likely-newer KeyPress serial for wl clipboard (#13483)

Click to expand commit body
The KeyEnter serial will be too old if another client replaces the
selection before the user unfocuses and refocuses the window (i.e.,
triggers another KeyEnter event).
The KeyPress event is more likely to be new enough.

Release Notes:

- Fixed setting clipboard sometimes not working on wayland
([#13445](https://github.com/zed-industries/zed/issues/13445)).

Matt Fellenz created

79430fc vim: Fix panic in search (#13487)

Click to expand commit body
Release Notes:

- vim: Fixed a panic when searching after focusing search bar with mouse

Conrad Irwin created

f96e4ba Add "Select Enclosing Symbol" command (#13435)

Click to expand commit body
I use this for a much faster workflow with inline assist when using fast
models.

Release Notes:

- Added "Select Enclosing Symbol" command based on tree-sitter outline.
Useful in combination with inline assist to rewrite a function.

Tristan Hume created

7be1ffb Add cross-compilation support from MacOS to Windows (#13382)

Click to expand commit body
- Modify `build.rs` to use environment variables instead of `cfg`
directive to make cross-compilation to Windows possible
- Make `embed-resource` a global build-dependency for cross-compilation

Release Notes:

- N/A

SELO created

93a5d0c Add limit to minimum window size (#13126)

Click to expand commit body
Release Notes:

- Add a limit to the minimum window size on macOS.

Here's the minimum window before change:
<img width="121" alt="image"
src="https://github.com/zed-industries/zed/assets/38318044/9e907194-42e5-457e-91ea-96613426b479">

After change:
<img width="410" alt="image"
src="https://github.com/zed-industries/zed/assets/38318044/6e9c3057-9860-4f4b-9a73-c158ebac5ba9">

Aaron Ruan created

328d98d windows: Make IME input on Windows consistent with that on macOS + some small fixs (#13386)

Click to expand commit body
### Before

![Screenshot 2024-06-22
180000](https://github.com/zed-industries/zed/assets/14981363/9efc3ccd-553c-4fe8-ada5-1b54f80bfbd5)

### After

![Screenshot 2024-06-22
175850](https://github.com/zed-industries/zed/assets/14981363/172675ca-9fda-45ae-bd97-59c33573a766)


Release Notes:

- N/A

张小白 created

76ab9e4 macOS: Fix IME action when deleting last char (#13385)

Click to expand commit body
Closes #12862 


https://github.com/zed-industries/zed/assets/14981363/170b1206-5894-4b90-bd5c-79761073d8f2


Release Notes:

- Fixed deleting the last character during IME composition would
mistakenly delete other characters.(#12862)

张小白 created

c477c12 x11: Fix handling of shift key (#13485)

Click to expand commit body
Fixes: #13306

Release Notes:

- N/A

Conrad Irwin created

1ffd87b Fix dev server projects reconnect (#13484)

Click to expand commit body
Release Notes:

- Improved handling of client reconnects for dev-servers (alpha group
only)

Conrad Irwin created

df11b64 Fix Linux search issues (#13479)

Click to expand commit body
In some rare cases, we wouldn't pick up .gitignore files in the right
order, causing performance issues for the project search and the file
finder

Release Notes:

- N/A

Mikayla Maki created

ed94bd4 Reorganize Quick Action Bar (#13476)

Click to expand commit body
This PR:

- Moves the selection menu to the end with the editor settings menu
- Tidies up labels in the settings menu
- Minor spacing updates

Release Notes:

- Improved organization in the Quick Action Bar

Nate Butler created

8949460 fix cli welcome screen (#13474)

Click to expand commit body
Release Notes:

- Fixed first launch via cli

---------

Co-authored-by: Mikayla <mikayla@zed.dev>

Conrad Irwin and Mikayla created

c6c5907 Fix unnecessary gitignore status updates due to failure to clear 'needs update' flag (#13471)

Click to expand commit body
I found this bug while investigating
https://github.com/zed-industries/zed/issues/13176. When running zed
with `RUST_LOG=worktree=trace`, I realized we were updating all
gitignore statuses on every file change. This was due to a logic error
where we were marking a gitignore as up-to-date on a temporary *clone*
of our snapshot, but not in the `BackgroundScanner` itself.

Release Notes:

- Fixed a bug that caused unnecessary computations to happen on every
file-system event.

Max Brunsfeld created

dea928b vim: Allow count and repeat for "r" and "shift-r" action (#13287)

Click to expand commit body
Fixing the "r" action just involved adapting `normal_replace` to replace
multiple characters.

Fixing the "shift-r" command was less straightforward. The bindings for
`vim::BeforeNormal` in replace mode were being overwritten and several
other steps required for action repetition were not performed. Finally,
the cursor adjustment after re-entering normal mode was duplicated
(`vim::BeforeNormal` was now triggered correctly) so I removed the
special case for replace mode.

Release Notes:

- Fixed vim "r" action to accept a count argument
- Fixed vim "shift-r" action to accept a count argument and allow
repetition

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Benjamin Davies and Conrad Irwin created

77b2da2 vim: Surround in visual mode (#13347)

Click to expand commit body
Adds support for surrounding text in visual/visual-line/visual-block
mode by re-using the `AddSurrounds` operator. There is no default
binding though so the user must follow the instructions to enable it.

Note that the behaviour varies slightly for the visual-line and
visual-block modes. In visual-line mode the surrounds are placed on
separate lines (the vim-surround extension also indents the contents but
I opted not to as that behaviour is less important with the use of code
formatters). In visual-block mode each of the selected regions is
surrounded and the cursor returns to the beginning of the selection
after the action is complete.

Release Notes:

- Added action to surround text in visual mode (no default binding).

Fixes #13122

Benjamin Davies created

5a8c2a4 linux/x11: Prioritize rendering in X11 event loop (#13468)

Click to expand commit body
This is a small change that aims to address frames being dropped when we
get a ton of X11 input events.

What it does, in short, is to first read all X11 input events and then
prioritize the rendering.

In my testing, it causes less frames to be dropped when the system is
under heavy load and lots of input events are being created.

Release Notes:

- N/A

Thorsten Ball created

d46e494 chore: Take down codegen-units in dev builds to 16 (#13466)

Click to expand commit body
codegen-units determines how many object files are used when building a
single crate. By default it is set to 256 in dev builds and to 16 in
release builds. Higher values can get in the way of optimizations, but
they should help when performing an incremental build (as higher
granularity means that it's less likely we'd have to rebuild the whole
crate). When we were tinkering with Linux builds we found that we're
spreading ourselves too thin at times; large values of codegen-units
were making builds of smaller crates, such as file_finder, redundantly
long, where some CGs were miniscule. This PR significantly reduces the #
of CGs we use in dev builds. This means that an incremental build of a
crate might have to rebuild a bit more, but overall, we should be
spending *less* time in multicrate builds.

As a result of this change, incremental build of gpui (`cargo build;
touch crates/gpui/src/gpui.rs; cargo build`) goes down from 29-32s to
22s on my machine. Same scenario for editor: 13s to 11s. I've ran `cargo
clean` before executing each run



Release Notes:

- N/A

Co-authored-by: Thorsten <thorsten@zed.dev>

Piotr Osiewicz and Thorsten created

8243507 Revert "linux/x11: Reduce input latency and ensure rerender priority (#13355)" (#13465)

Click to expand commit body
This reverts commit f69c8ca74eb934f37d29cbe2f6ee31f94c7aaf63 after it
has already been partially reverted in
https://github.com/zed-industries/zed/pull/13458.

Why the revert?

The changes in that commit/PR fix one type of problem — dropping of
frames when being blasted with input events — but trades it for another
one that I can't explain yet: when the system is under load, then input
becomes _laggy_ and input events seem to be delayed.

Two examples of how that shows up:

1. When the system is under load* and you hold down the `down` key to
scroll, then lift the finger, the cursor stops sometimes. If you then
produce another input event by jiggling the mouse cursor you'll see more
`down`-key events coming up and the cursor moving down. It feels as if
the event loop is not being woken up even though there are still events.
I suspect it might have something to do with XIM, because if it's
disabled, it seems as if problems become less severe.
2. When the system is under load* and you click-and-drag a selection in
the editor, you can see how the selection is delayed and takes 500ms-1s
to catch up to where the cursor is.

* system under load: start Zed, then in another terminal window create a
release build of Zed, for example.

With the changes reverted, the failure mode looks different: we skip
frames. But that, I think, is the better of two bad options, because
skipping frames means that you see what's happening vs. input events
seemingly still coming in seconds after you stopped using the keyboard.

Release Notes:

- N/A

Thorsten Ball created

40748b0 autosave: Respect project autosave settings per file (#13369)

Click to expand commit body
This fixes #13316 by checking whether there are any local workspace
settings for a given file.

Release Notes:

- Fixed `autosave` settings in project-specific settings file being
ignored. ([#13316](https://github.com/zed-industries/zed/issues/13316)).

Co-authored-by: Bennet <bennet@zed.dev>

Thorsten Ball and Bennet created

3ee3c6a cargo: Add release-fast profile (#13464)

Click to expand commit body
This saves us ~1min of linking time on my Linux machine.

Release Notes:

- N/A

Co-authored-by: Piotr <piotr@zed.dev>

Thorsten Ball and Piotr created

6cc3a4d linux/x11: Fallback to 800x600 if window bounds size has 0 (#13462)

Click to expand commit body
As reported here
https://github.com/zed-industries/zed/issues/13203#issuecomment-2183514518
it seems that sometimes we get 0 values for the window bounds.

Instead of failing to start up, we log a warning and fall back to
defaults that let a window show up.


Release Notes:

- N/A

Thorsten Ball created

b58dfe5 Update Cargo.toml (#13375)

Click to expand commit body
miss nightly build https://github.com/servo/pathfinder/issues/565

Release Notes:

- N/A

d1y created

03e2f24 windows: Fix JSON schema validation (#13459)

Click to expand commit body
This PR needs suggestions, especially from the Zed team. As I mentioned
in a previous issue #13394 , the `vscode-json-languageserver` that Zed
originally relied on has some issues with JSON schema validation on
Windows, and it hasn't been updated for a long time. This PR uses the
more frequently updated `vscode-langservers-extracted`, which resolves
this issue.

Currently, `vscode-langservers-extracted` includes not only the JSON LSP
server but also LSP servers for other languages. I think we might need a
package specifically for the JSON LSP server, such as something like
`vscode-json-langserver-extracted`, or we could consider using the LSP
servers for other languages from this package as well.

And, there are some issues with installing
`vscode-langservers-extracted` on Windows, causing the `postinstall`
script to fail. However, this does not seem to affect any functionality.
Therefore, I think the best solution is for the Zed team to maintain a
package like `vscode-json-langserver-extracted` or something else. This
way, we can update it promptly and address the installation issues on
Windows.

Any suggestions or advices are welcome.


#### JSON vaildation on Winodws



https://github.com/zed-industries/zed/assets/14981363/8cd7ff54-28ec-4601-b2e5-183e2fae2051



Closes #13394 

Release Notes:

- Fixed JSON schema validation issue on Windows.(#13394 )

张小白 created

145cd79 project panel: Sticky dragging + do not move thumb when it's clicked (#13460)

Click to expand commit body
/cc @mrnugget 
Release Notes:

- N/A

Piotr Osiewicz created

9ef9bae linux/x11: Fix CPU being pinned at 100% in X11 loop (#13458)

Click to expand commit body
This was part of https://github.com/zed-industries/zed/pull/13355 to fix
the problem of XIM events not waking up the loop. Problem is that it
seems to pin a single CPU at 100%.

Luckily, it looks like the change is not necessary anymore after we
refactored the improvements in #13355.

This fixes https://github.com/zed-industries/zed/issues/13409.

Release Notes:

- N/A

Thorsten Ball created

d2a2faf Update `soft_wrap` config option documentation (#13457)

Click to expand commit body
Closes https://github.com/zed-industries/zed/discussions/13440

Release Notes:

- N/A

Kirill Bulatov created

10f7ca6 Multi-cursor removal possibility (#13431)

Click to expand commit body
Release Notes:

- Added the ability to remove multi-cursors by clicking on them again.
([#13058](https://github.com/zed-industries/zed/issues/13058)).

Krzysztof Witkowski created

3544274 vim: Switch to normal mode after toggling comments (#13412)

Click to expand commit body
Release Notes:

- vim: Fixed switching to normal mode after `g c`(vim::ToggleComments)
in visual mode
([#4439](https://github.com/zed-industries/zed/issues/4439))

crwen created

9813297 Combine multiple buffer update count fields into one (#13449)

Click to expand commit body
Buffers carry several pieces of state besides their text: syntax tree,
diagnostics, git diff, and file data. Previously, the buffer maintained
a separate integer version number for each of these four pieces of
state, incrementing it every time that piece of state is updated. This
is used by MultiBuffers to detect when they need to update excerpts.

Previously, for a given buffer, these four version numbers were stored
on the buffer itself, on every snapshot of the buffer, in any
multi-buffer that referenced that buffer, **and** on snapshots of that
multi-buffer. But the only use for the version numbers was reduced down
to a single boolean predicate: whether or not the buffer's state has
changed.

In this PR, I've combined those 4 version numbers into one. I've called
it `non_text_state_update_count` because it tracks all state updates
outside of the text itself. This removes a bunch of unnecessary code,
and reduces the size of buffer snapshots and multi-buffer snapshots.

Release Notes:

- N/A

Max Brunsfeld created

78bc3a9 snippets: Release 0.0.5 (#13434)

Click to expand commit body
Fix invalid platform name on Linux.
Related to:
https://github.com/zed-industries/zed/pull/13253#issuecomment-2185323702
Release Notes:

- N/A

Piotr Osiewicz created

73de99b Use - instead of _ in secret name

Nathan Sobo created

0ed1b29 Assign GOOGLE_AI_API_KEY from a Kubernetes secret (#13429)

Click to expand commit body
Release Notes:

- N/A

Nathan Sobo created

5b75491 Respect requested gemini model (#13427)

Click to expand commit body
Previously, we always went to gemini-pro.

Release Notes:

- N/A

Nathan Sobo created

9298d3b editor: Select first match in "Find all references" editor (#13424)

Click to expand commit body
Previously we've placed cursor on the first line of the first excerpt in
the multibuffer, but alas,
https://x.com/fasterthanlime/status/1804883499809165473 happened (j/k,
this feedback is totally valid) and now we're gonna place it at the end
of the first reference. As a bonus, with the old configuration `editor:
select next` tripped over itself. Now it's possible (& feasible) to do a
"select next" in "find all references"; consecutive referenced ranges
will be selected.

Fixes #13419



Release Notes:

- Fixed a bug where "Find all references" editor had cursor placed on
the first line of the first excerpt in the multibuffer instead of having
it on the first reference.

Piotr Osiewicz created

89739d5 project panel: Do not display scrollbar when entries do not overflow the panel (#13422)

Click to expand commit body
/cc @JunkuiZhang 

Fixes
https://github.com/zed-industries/zed/pull/13358#issuecomment-2185032031

Release Notes:

- N/A

Piotr Osiewicz created

d272e40 project panel: Add vertical scrollbar (#13358)

Click to expand commit body
Fixes #4865
Release Notes:

- Added vertical scrollbar to project panel

Piotr Osiewicz created

5c93506 Fix a prompt typo (#13416)

Click to expand commit body
Release Notes:

- N/A

ᴀᴍᴛᴏᴀᴇʀ created

7df8b6f Fix: Picker select_last not scrolling to item index (#13393)

Click to expand commit body
Release Notes:

- Fix: Command palette not scrolling down to the last element

Vitor Ramos created

6fba1e4 Remove never-used client parameter from message handler functions (#13406)

Click to expand commit body
Every single client-side RPC message handler function took an unused
`Arc<Client>` parameter. This removes that.

Release Notes:

- N/A

Max Brunsfeld created

988ee93 Demote LSP request time log to trace level

Max Brunsfeld created

00a505e docs: Correct path to global tasks file (#13372)

Click to expand commit body
The documentation lists the path to the global tasks config file as
`~/.config/tasks.json`, but it's actually `~/.config/zed/tasks.json`.


Release Notes:

- N/A

Dave Grijalva created

ed9f6e2 Fix inline assistant not working at the start/end of a file (#13384)

Click to expand commit body
This was due to a bug in the `MultiBufferSnapshot::excerpts_in_ranges`
method. As part of this, I took the chance to rewrite that logic and
simplify it a bit.

Release Notes:

- N/A

Antonio Scandurra created