Commit log

13405ed Add emacs keybindings for mark emulation (#22904)

Click to expand commit body
These keybindings extend the already selected text. This allows closer
emacs emulation where subsequent movement commands extend / shrink the
current selection instead of dismissing it.

This is a follow up on 
- #21927

Release Notes:

- Added emacs movement keybindings that extend/shrink the current
selection

---------

Co-authored-by: Peter Tripp <peter@zed.dev>

Ozan and Peter Tripp created

c26553d Add more metrics for Fireworks Completion Requested (#23062)

Click to expand commit body
Release Notes:

- N/A

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

Antonio Scandurra and Thorsten created

f2ab00c Improve prompt caching for edit prediction (#23061)

Click to expand commit body
This is achieved by halving the number of events instead of popping the
front.

Release Notes:

- N/A

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

Antonio Scandurra and Thorsten created

e084848 Clarify logic for `Autoscroll::newest()` and `Autoscroll::fit()` (#23048)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

6aba395 Improve keymap json schema (#23044)

Click to expand commit body
Also:

* Adds `impl_internal_actions!` for deriving the `Action` trait without
registering.

* Removes some deserializers that immediately fail in favor of
`#[serde(skip)]` on fields where they were used. This also omits them
from the schema.

Release Notes:

- Keymap settings file now has more JSON schema information to inform
`json-language-server` completions and info, particularly for actions
that take input.

Michael Sloan created

4c50201 For informational LSP queries log errors instead of notifying in UI (#23040)

Click to expand commit body
I added these notifies in #23011, but in practive have found them to be
overly disruptive. It would definitely be good to do something better
than logging here, but having a sticky error notification is worse. I
think it is still good to notify on mutation failures, so left those in

In particular with rust-analyzer, "Go to definition" and "Find
references" frequently fail with "Content modified" quite a while after
sending the request. Since users are probably used to these operations
being finicky it doesn't seem useful to have a prominent display of
errors for them.

Michael Sloan created

fb65044 Reuse vtsls logic for completion details display (#23030)

Click to expand commit body
Part of https://github.com/zed-industries/zed/issues/22833,
https://github.com/zed-industries/zed/issues/22267,
https://github.com/zed-industries/zed/issues/22503

Before:

![image](https://github.com/user-attachments/assets/b6abd3dc-b5d7-4d6a-91e2-92361a519adb)

![image](https://github.com/user-attachments/assets/e3a9e766-efbe-4f4d-b4f9-e6b019e165a5)

After:

![image](https://github.com/user-attachments/assets/d29414d5-4fcc-4d2f-adb2-48304cbafdf6)

Copies https://github.com/zed-industries/zed/pull/15087 change into
`typescript-language-server`-related label details rendering code.

Release Notes:

- Improved typescript-language-server's completion details rendering

Kirill Bulatov created

b6b8740 Do not try to activate the terminal panel twice (#23029)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/23023

Fixes terminal pane button opening two terminals on click.

The culprit is in

https://github.com/zed-industries/zed/blob/61115bd04792d87a540558753cd01a6368baba2a/crates/workspace/src/workspace.rs#L2412-L2417

* We cannot get any panel by index from the Dock, only an active one
* Both `dock.activate_panel(panel_index, cx);` and `dock.set_open(true,
cx);` do `active_panel.panel.set_active(true, cx);`

So, follow other pane's impls that have `active: bool` property for this
case, e.g.
https://github.com/zed-industries/zed/blob/3ec52d8451dd1178c4d036da3a71c827df422f4b/crates/assistant/src/inline_assistant.rs#L2687

Release Notes:

- Fixed terminal pane button opening two terminals on click

Kirill Bulatov created

61115bd Fix a completions panic when no fuzzy matches + inline completion (#23019)

Click to expand commit body
My mistake in #22977, in the case where the inline completion was not
selected it set the index to 1 assuming there would be following match
entries.

Michael Sloan created

5785266 Improve doc comments about keybinding order (#23014)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

daaa250 Include display text for LSP commands in errors (#23012)

Click to expand commit body
https://github.com/zed-industries/zed/pull/23011 adds display of errors
in the UI so it's now more important to contextualize these.

Release Notes:

- N/A

Michael Sloan created

de2e197 Inline `perform_rename_impl` as its only used in one spot (#23013)

Click to expand commit body
Also removes a redundant use of `to_point_utf16`.

Release Notes:

- N/A

Michael Sloan created

65c38f2 Notify user about LSP errors from editor actions (#23011)

Click to expand commit body
Closes #22976

Release Notes:

* Improved visibility of errors from language servers by reporting them
in the UI when the user invokes an LSP action.

Michael Sloan created

6bc89eb docs: Fix "copy" being used instead of "paste" in vim mode documentation (#23010)

Click to expand commit body
It seems the original author intended to write either "`ctrl+c` to copy"
or "`ctrl+v` to paste". Updated to be "`ctrl+v` to paste".

Release Notes:

- N/A

Co-authored-by: Michael Sloan <michael@zed.dev>

Tyler Albee and Michael Sloan created

bda0c67 Add support for rename with language servers that lack prepareRename (#23000)

Click to expand commit body
This adds support for LSPs that use the old rename flow which does not
first ask the LSP for the rename range and check that it is a valid
range to rename.

Closes #16663

Release Notes:

* Fixed rename symbols action when the language server does not have the
capability to prepare renames - such as `luau-lsp`.

Michael Sloan created

b65dc8c Fix jank in LSP debug log autoscroll (#22998)

Click to expand commit body
Not sure why scroll was janky with `Autoscroll::newest()`, but this
appears to fix it. Probably better to conditionally do the autoscroll
requests anyway.

Release Notes:

- N/A

Michael Sloan created

bbbd1e9 LSP debug logs: Default to soft wrap + fold long lines + autoscroll (#22996)

Click to expand commit body
Closes #18737

Release notes:

- Improved LSP debug logs by defaulting to soft wrap and folding a
suffix of long lines. Also adds autoscroll, so if the cursor is on the
last line of the logs they will scroll like `tail`.

Michael Sloan created

40ecc38 assistant2: Make `ContextStore::insert_*` methods private (#22989)

Click to expand commit body
This PR makes the `insert_*` methods on the `ContextStore` private, to
reduce confusion with the public `add_*` methods.

Release Notes:

- N/A

Marshall Bowers created

1fcc9b3 zeta: Report Fireworks request data to Snowflake (#22973)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Conrad <conrad@zed.dev>

Thorsten Ball , Antonio Scandurra , and Conrad created

3d80b21 eslint: Allow configuring `workingDirectory` (#22972)

Click to expand commit body
This addresses this comment here:
https://github.com/zed-industries/zed/issues/9648#issuecomment-2579246865

Release Notes:

- Added ability to configure `workingDirectory` when using ESLint.
Example: `{"lsp": {"eslint": {"settings": {"workingDirectory": {"mode":
"auto" }}}}}`

Thorsten Ball created

05b48e8 zeta: Add tooltip to completion modal list items (#22987)

Click to expand commit body
This is an extra visual aid to make assessing the status of each list
item faster/easier.

<img width="800" alt="Screenshot 2025-01-10 at 7 01 22 PM"
src="https://github.com/user-attachments/assets/4aa712ed-cc70-4ded-afab-e7ceda535ec0"
/>

Release Notes:

- N/A

Danilo Leal created

8bd7a04 Improve TypeScript highlights (#18525)

Click to expand commit body
- Move function queries under constant queries to avoid uppercase
functions highlighted as constants
- Merge keywords and remove duplicates
- Highlights type aliases on import
- Highlights literal built-in types (null, undefined, true, false) as
`@type.builtin`

Confused about case-based queries, should they be rewritten?

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

狐狸 and Marshall Bowers created

1e0ded4 zeta: Show keybinding in completion rating buttons in review modal (#22985)

Click to expand commit body
This PR also removes the `ThumbsUp` action that wasn't being triggered
correctly. We didn't have it's counterpart `ThumbsDown`, too, so I
mostly assumed it would be harmless to remove `ThumbsUp` as well.

<img width="800" alt="Screenshot 2025-01-10 at 6 18 44 PM"
src="https://github.com/user-attachments/assets/9fd5da9f-9dff-454d-9f31-c02f1370b937"
/>

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Danilo Leal and Marshall Bowers created

dad1a3b assistant2: Inline `read` calls (#22982)

Click to expand commit body
This PR inlines the `read` calls on models in a few spots.

Release Notes:

- N/A

Marshall Bowers created

0f1c2a8 ci: Install `cargo-nextest` with `--locked` (#22984)

Click to expand commit body
This PR makes it so we install `cargo-nextest` with `cargo install
cargo-nextest --locked` in CI.

According to the
[docs](https://nexte.st/docs/installation/from-source/), this is the
**only** supported way to install `cargo-nextest` when building from
source.

Release Notes:

- N/A

Marshall Bowers created

80cc1f1 assistant2: Hide the status bar icon when disabled via the settings (#22981)

Click to expand commit body
This PR makes it so the status bar icon for Assistant2 is hidden when it
is disabled via the settings.

Release Notes:

- N/A

Marshall Bowers created

2f07d53 assistant2: Remove unneeded `#[allow(unused)]`s (#22979)

Click to expand commit body
This PR removes some unneeded `#[allow(unused)]`s from the context types
in Assistant2.

We're using these fields now, so we no longer need to suppress the
unused lint.

Release Notes:

- N/A

Marshall Bowers created

fe3d409 If completions menu is already displayed, don't select inline completion (#22977)

Click to expand commit body
Before this change, inline completion would displace the user's
selection. Unfortunately this brings less visibility to the inline
completion, I think a good solution to this will be to display a chunk
of the completion inline in the menu, and have a WIP change for that.
Since the current behavior is frustrating, not blocking this improvement
on that

Release Notes:

- N/A

Michael Sloan created

c74ad61 emacs: Add as Transpose Characters (editor::Transpose) (#22974)

Click to expand commit body
Originally reported here:
-
https://github.com/zed-industries/zed/issues/4856#issuecomment-2578468329

macOS default vscode keymap already has this:

https://github.com/zed-industries/zed/blob/8d42456b8a7c547c6760b604c24d902bd2e12b8b/assets/keymaps/default-macos.json#L55
But it's disabled on Linux default vscode keymap as VSCode has this bind
instead:

https://github.com/zed-industries/zed/blob/8d42456b8a7c547c6760b604c24d902bd2e12b8b/assets/keymaps/default-linux.json#L407

Explicitly add it to both emacs keymaps so we can keep them identical
between macos/linux as long as possible.

Release Notes:

- emacs: Add support for `ctrl-t` transposing characters on Linux

Peter Tripp created

c6df23f csharp: Add `brackets.scm` (#22936)

Click to expand commit body
This pull request adds the missing `brackets.scm` for the C#-extension.

Release Notes:

- N/A

Finn Evers created

4c7b72b Clarify guests vs collaborators in project sharing docs (#22945)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

3795963 emacs: Fix emacs in embedded terminal on Linux too (#22969)

Click to expand commit body
- Follow-up to #22779 (accidentially did macos only)
- Follow-up to: https://github.com/zed-industries/zed/pull/22590

Release Notes:

- N/A

Peter Tripp created

b74cb92 docs: Fix missing } in multiple formatters example (#22964)

Click to expand commit body
Add a missing } in the multiple formatters example in the configuring
Zed section of the manual.

Release Notes:

- Fixed a missing } in the multiple formatters doc example

Jeremy Cowgar created

cbc403d assistant2: Change suggested file context pill label (#22967)

Click to expand commit body
Changing it from "Open File" to "Active Tab" instead.

<img width="800" alt="Screenshot 2025-01-10 at 11 09 54 AM"
src="https://github.com/user-attachments/assets/534e94a4-df61-41d4-ad50-514ab9a87e4e"
/>

Release Notes:

- N/A

Danilo Leal created

5310e33 assistant2: Fix context strip context popover position in relation to trigger (#22966)

Click to expand commit body
Little visual adjustment here.

| Before | After |
|--------|--------|
| <img width="1336" alt="Screenshot 2025-01-10 at 11 08 06 AM"
src="https://github.com/user-attachments/assets/268c6df6-fdb2-4a1c-b3b8-d6a39b93b206"
/> | <img width="1336" alt="Screenshot 2025-01-10 at 11 06 17 AM"
src="https://github.com/user-attachments/assets/fb53feef-9ae4-489b-9d12-bd50b349afc1"
/> |

Release Notes:

- N/A

Danilo Leal created

9248458 assistant2: Change model selector keybinding and make it visible (#22965)

Click to expand commit body
We weren't showing the keybinding in none of the places where the model
selector was visible. Also, I took advantage of the opportunity to
change the keybinding for two reasons:

1. `cmd-shift-m` caused conflict if on an editor (inline assistant case)
2. `cmd-opt-/` is the one Cursor uses; so consistency with something
that might be already consolidated sounds like a low-hanging fruit

| Editor Inline Assist | Terminal Inline Assist | Assistant Panel |
|--------|--------|--------|
| <img width="1336" alt="Screenshot 2025-01-10 at 11 01 24 AM"
src="https://github.com/user-attachments/assets/0782f217-025f-4bc0-b2fa-64b3524c968b"
/> | <img width="1336" alt="Screenshot 2025-01-10 at 11 01 29 AM"
src="https://github.com/user-attachments/assets/d05a3b5c-33fd-4593-b1d8-aa9944de816a"
/> | <img width="1336" alt="Screenshot 2025-01-10 at 11 01 33 AM"
src="https://github.com/user-attachments/assets/8cb075e7-ccde-46f5-aa05-d20a9d42b286"
/> |

Release Notes:

- N/A

Danilo Leal created

a267911 assistant2: Suggest recent files and threads as context (#22959)

Click to expand commit body
The context picker will now display up to 6 recent files/threads to add
as a context:

<img
src="https://github.com/user-attachments/assets/80c87bf9-70ad-4e81-ba24-7a624378b991"
width=400>



Note: We decided to use a `ContextMenu` instead of `Picker` for the
initial one since the latter didn't quite fit the design for the
"Recent" section.

Release Notes:

- N/A

---------

Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>

Agus Zubiaga , Danilo , Piotr , and Nathan created

49198a7 Do not show copy buttons in editor's hover popovers (#22962)

Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/22866

Added a config option to the markdown renderer to omit code copying
buttons, and used those for editor hover popovers.

Such popovers are quite frequent in language servers' hover responses,
e.g. rust-analyzer on `.clone()` hover may respond with
```
{"jsonrpc":"2.0","id":119,"result":{"contents":{"kind":"markdown","value":"\n```rust\nalloc::string::String\n```\n\n```rust\nfn clone(&self) -> Self\n```\n\n---\n\nReturns a copy of the value.\n\n# Examples\n\n```rust\nlet hello = \"Hello\"; // &str implements Clone\n\nassert_eq!(\"Hello\", hello.clone());\n```"},"range":{"start":{"line":518,"character":24},"end":{"line":518,"character":29}}}}
```

(note multiple code blocks sent)


![image](https://github.com/user-attachments/assets/4c40b15e-8f53-4b3d-a809-f1e4d35a00a7)


![image](https://github.com/user-attachments/assets/77b8e13b-b665-42d3-b633-5a0375998f06)

Sounds that editor has either to use a different way to copy popover's
data (so the entire text gets copied, not just its code blocks), or at
least better handle hover popover's hovering to show the button.


Release Notes:

- N/A

Kirill Bulatov created

c330107 Log errors when a prediction fails (#22961)

Click to expand commit body
Release Notes:

- N/A

---------

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

Antonio Scandurra and Thorsten created

9e113bc deps: Bump smol to 2.0 (#22956)

Click to expand commit body
The collateral of this is that code size is increased by ~300kB, but I
think we can stomach it.

Release Notes:

- N/A

Piotr Osiewicz created

1f84c1b nix: Fix webrtc-sys and libstdc++ build errors in development shell (#22938)

Click to expand commit body
Closes #22937

- Added bzip2 package to the build inputs
- Set LD_LIBRARY_PATH environment variable to stdenv.cc.cc.lib

Release Notes:

- N/A

AidanV created

a1cedbe zeta: Fix completions not being marked as rated (#22952)

Click to expand commit body
Seems like #22171 accidentally removed this line.

Now it's back and completions are marked as rated again.

![screenshot-2025-01-10-10 56
32@2x](https://github.com/user-attachments/assets/c68bff1b-5b97-493e-9062-390876fd757c)

Release Notes:

- N/A

Thorsten Ball created

1b44398 Make `SelectionsCollection::disjoint_anchor_ranges` return an iterator (#22948)

Click to expand commit body
This helps discourage unnecessary collection to Vec

Release Notes:

- N/A

Michael Sloan created

690ad29 assistant2: Small misc efficiency improvements (#22947)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

767f44b assistant2: Implement refresh of context on message editor send (#22944)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

0b105ba vim: Add sneak motion (#22793)

Click to expand commit body
A (re)continuation of https://github.com/zed-industries/zed/pull/21067. 

This takes the original implementation in
https://github.com/zed-industries/zed/pull/15572 and adds the test in
https://github.com/zed-industries/zed/pull/21067. Then, as requested in
https://github.com/zed-industries/zed/pull/21067#issuecomment-2515469185,
it documents how to map a keybinding instead of having a setting.

Closes #13858

Release Notes:

- Added support for the popular
[vim_sneak](https://github.com/justinmk/vim-sneak) plugin. This is
disabled by default and can be enabled by binding a key to the `Sneak`
and `SneakBackward` operators.

Reference:
https://github.com/justinmk/vim-sneak

---------

Co-authored-by: Kajetan Puchalski <kajetan.puchalski@tuta.io>
Co-authored-by: Aidan Grant <mraidangrant@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Nico Lehmann , Kajetan Puchalski , Aidan Grant , and Conrad Irwin created

0d6a549 assistant2: More improvement to prompt building efficiency (#22941)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

ec4c674 assistant2: Show file icons for context entries (#22928)

Click to expand commit body
https://github.com/user-attachments/assets/d3d6f5f1-23ec-449b-a762-9869b9d4b5a5


Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Michael <michael@zed.dev>

Agus Zubiaga , Nathan , and Michael created

c9008fb Format all selections even if they are cursors (#22933)

Click to expand commit body
Closes #22816

Release Notes:

- Format selections now also applies to cursors.

Michael Sloan created

0dd7ea4 assistant2: Background load of context + prep for refresh + efficiency (#22935)

Click to expand commit body
* Now loads context on background threads.

- For file and directory context, buffer ropes can be shared between
threads as they are immutable. This allows for traversal and
accumulation of buffer text on a background thread.

- For url context, the request, parsing, and rendering is now done on a
background thread.

* Prepares for support of buffer reload by individually storing the text
of directory buffers.

* Avoids some string copying / redundant strings.

- When attaching message context, no longer builds a string for each
context type.

- For directory context, does not build a `SharedString` for the full
text, instead has a slice of `SharedString` chunks which are then
directly appended to the message context.

- Building a fenced codeblock for a buffer now computes a precise
capacity in advance.

Release Notes:

- N/A

Michael Sloan created