Commit log

fcadd3e cpp: Enable language server as formatter by default (#23112)

Click to expand commit body
As @hferreiro points out in [this

comment](https://github.com/zed-industries/zed/pull/18752#issuecomment-2589340565):
C++ and prettier don't work well together, so let's make the default
formatter for C++ the primary language server. We get that by disabling
prettier.

Release Notes:

- Changed default formatter for C++ to be the primary language server,
not Prettier. Format-on-save is still disabled by default for C++, but
if one uses the `editor: format` command now, it will default to the
language server. `clangd` can format C++ files, whereas prettier cannot.

Thorsten Ball created

a13e64e Keymap json schema generation improvements intended to be in #23098 (#23114)

Click to expand commit body
Intended to include these in #23098, but seems they didn't push before
merge. Probably didn't use `--force-with-lease`

Michael Sloan created

26be440 vim: Add Subword Textobject (#22387)

Click to expand commit body
Closes #22761

[Vim: subword text object?
#22280](https://github.com/zed-industries/zed/discussions/22280)

Release Notes:

- Added Vim SubWord TextObject

---------

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

0x2CA and Conrad Irwin created

03c99e3 vim: Fix vim delete to line (#23053)

Click to expand commit body
Closes #23024

Release Notes:

- Fixed Vim `dxG` delete to line

---------

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

0x2CA and Conrad Irwin created

93f117b Improve registration for Assistant code action providers (#23099)

Click to expand commit body
This PR is a follow-up to
https://github.com/zed-industries/zed/pull/22911 to further improve the
registration of code action providers for the Assistant in order to
prevent duplicates.

The `CodeActionProvider` trait now has an `id` method that is used to
return a unique ID for a code action provider. We use this to prevent
registering duplicates of the same provider.

The registration of the code action providers for Assistant1 and
Assistant2 have also been reworked. Previously we were not call the
registration function—and thus setting up the subscriptions—until we
resolved the feature flags. However, this could lead to the registration
happening too late for existing workspace items.

We now perform the registration right away and then remove the undesired
code action providers once the feature flags have been resolved.

Release Notes:

- N/A

Marshall Bowers created

830f45e assistant2: Add floating indicator when a response is streaming (#23096)

Click to expand commit body
This PR adds a separate indicator at the bottom of the thread that shows
when a response is being streamed (as well as how to cancel it):

<img width="1309" alt="Screenshot 2025-01-13 at 4 19 07 PM"
src="https://github.com/user-attachments/assets/b64f785b-d522-458d-b915-3f604890597f"
/>

Release Notes:

- N/A

Marshall Bowers created

ae103fd Fix confusing keymap json errors and hovers for nonexistent actions (#23098)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

c599ba6 assistant2: Only show the streaming indicator on the last Assistant message (#23090)

Click to expand commit body
This PR is a follow-up to #23078 to ensure that the streaming indicator
only shows up on the last Assistant message.

Release Notes:

- N/A

Marshall Bowers created

867c069 editor: Adjust offset of the opened jump target in the multibuffer (#23091)

Click to expand commit body
This PR fixes an issue with jumping from multi_buffer to a file; namely,
the scroll offset of the opened buffer used to match the position within
the multibuffer, but it broke a while back. This is because we were
opening a buffer without providing the data about the origin scroll
offset.

Closes #ISSUE

Release Notes:

- Fixed a bug where the relative position of an excerpt within the
multibuffer was not accounted for while jumping to the buffer, causing
the clicked line to drastically change position on screen.

Piotr Osiewicz created

ac2d3ee Remove commented-out code (#23089)

Click to expand commit body
This PR removes some commented-out code from the codebase.

Release Notes:

- N/A

Marshall Bowers created

4054d4a assistant2: Fix inline context picker and handle dismiss (#23081)

Click to expand commit body
The new `ContextMenu`-based `ContextPicker` requires initialization when
opened, but we were only doing this for the `ContextStrip` picker, not
the inline one.

Additionally, because we have a wrapper element around ContextMenu, we
need to propagate the `DismissEvent` so that it properly closes when
Escape is pressed.

Release Notes:

- N/A

Agus Zubiaga created

7c2c409 Show configuration in language server debug logs (#23084)

Click to expand commit body
Release Notes:

- Added configuration sent on initialization to the `Server Info`
section of the language server logs.

Michael Sloan created

d4e91c1 Add support for namespace changes in action deprecations (#23086)

Click to expand commit body
cc @cole-miller 

Release Notes:

- N/A

Michael Sloan created

b633f62 Add test that JSON schema generation works + actions build from no input (#23049)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

85b727c Remove inaccurate comments (#23056)

Click to expand commit body
These comments are inaccurate. Even if `convert_case` provided a way to
customize which boundaries were used (which is now does, it 0.7.1), they
would be removed from the string and replaced with the new boundary
character (`-`, `_`, ...), and we'd lose the ability to reconstruct the
text the way the author formatted it. This is not a hack, this is the
way we have to do it.

Release Notes:

- N/A

Joseph T. Lyons created

bd3c7d6 git: Fully implement "all staged" checkbox (#23079)

Click to expand commit body
Also includes some improvements to the "stage/unstage all" actions and
buttons.

Release Notes:

- N/A

Cole Miller created

2179be1 assistant2: Add an indicator when a response is streaming in (#23078)

Click to expand commit body
This PR adds an indicator to the Assistant message to indicate that it
is still streaming:

<img width="1310" alt="Screenshot 2025-01-13 at 2 10 33 PM"
src="https://github.com/user-attachments/assets/635ee60d-b5ea-40ac-952a-b7bfa7e04fcc"
/>

Release Notes:

- N/A

Marshall Bowers created

2f76295 Take a reference in LSP notify (#23077)

Click to expand commit body
In current code this doesn't have benefit. In preparation for avoiding a
clone of workspace configuration. Having the interface this way may make
opportunities for efficiency clearer in the future

Release Notes:

- N/A

Michael Sloan created

c1c767a assistant2: Make `Esc` cancel current completion (#23076)

Click to expand commit body
This PR makes it so pressing `Esc` in Assistant2 will cancel the current
completion.

Release Notes:

- N/A

Marshall Bowers created

b59a9f1 Document why rust-analyzer doesn't show action name in action docs (#23072)

Click to expand commit body
rust-analyzer does not support derive_macro expansion in attributes -
https://github.com/rust-lang/rust-analyzer/issues/8092. This could be
worked around via a proc_macro, but I think it'd be best to just require
docs for every action.

Release Notes:

- N/A

Michael Sloan created

102e708 git: Git Panel UI, continued (#22960)

Click to expand commit body
TODO:

- [ ] Investigate incorrect hit target for `stage all` button
- [ ] Add top level context menu
- [ ] Add entry context menus
- [x] Show paths in list view
- [ ] For now, `enter` can just open the file
- [ ] 🐞: Hover deadzone in list caused by scrollbar
- [x] 🐞: Incorrect status/nothing shown when multiple worktrees are
added

---

This PR continues work on the feature flagged git panel.

Changes:
- Defines and wires up git panel actions & keybindings
- Re-scopes some actions from `git_ui` -> `git`.
- General git actions (StageAll, CommitChanges, ...) are scoped to
`git`.
- Git panel specific actions (Close, FocusCommitEditor, ...) are scoped
to `git_panel.
- Staging actions & UI are now connected to git!
- Unify more reusable git status into the GitState global over being
tied to the panel directly.
- Uses the new git status codepaths instead of filtering all workspace
entries

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <53574922+cole-miller@users.noreply.github.com>
Co-authored-by: Cole Miller <cole@zed.dev>

Nate Butler , Cole Miller , and Cole Miller created

1c6dd03 Add Diagnostics key context (#23043)

Click to expand commit body
Closes #17337

Release Notes:

- Add `Diagnostics` key context
- Enables users to specify key bindings for that pane

```json
{
    "context": "Diagnostics",
    "bindings": {
        "alt-q": "diagnostics::ToggleWarnings"
    }
}
```

everdrone created

955248f copilot_chat: Rename `o1-preview` model to `o1` (#23038)

Click to expand commit body
https://github.blog/news-insights/openais-o1-model-available-in-copilot-chat-and-github-models/

Release Notes:

- Renamed Github Copilot Chat "o1-preview" model to "o1".

---------

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

SkywardSyntax and Marshall Bowers created

7ed834b terminal: Fix unresponsive buttons on load until center pane is clicked + Auto-focus docked terminal on load if no other item is focused (#23039)

Click to expand commit body
Closes #23006

This PR should have been split into two, but since the changes are
related, I merged them into one.

1. On load, the title bar actions and bottom bar toggles are
unresponsive until the center pane is clicked. This happens because the
terminal captures focus (even if it's closed) long after the workspace
sets focus to itself during loading.

The issue was in the `focus_view` call used in the `new` method of
`TerminalPanel`. Since new terminal views can be created behind the
scenes (i.e., without the terminal being visible to the user), we
shouldn't handle focus for the terminal in this case. Removing
`focus_view` from the `new` method has no impact on the existing
terminal focusing logic. I've tested scenarios such as creating new
terminals, splitting terminals, zooming, etc., and everything works as
expected.

2. Currently, on load, docked terminals do not automatically focus when
they are only visible item to the user. This PR implements it.

Before/After:

1. When only the dock terminal is visible on load. Terminal is focused.

<img
src="https://github.com/user-attachments/assets/af8848aa-ccb5-4a3b-b2c6-486e8d588f09"
alt="image" height="280px" />

<img
src="https://github.com/user-attachments/assets/8f76ca2e-de29-4cc0-979b-749b50a00bbd"
alt="image" height="280px" />

2. When other items are visible along with the dock terminal on load.
Editor is focused.

<img
src="https://github.com/user-attachments/assets/d3248272-a75d-4763-9e99-defb8a369b68"
alt="image" height="280px" />

<img
src="https://github.com/user-attachments/assets/fba5184e-1ab2-406c-9669-b141aaf1c32f"
alt="image" height="280px" />

3. Multiple tabs along with split panes. Last terminal is focused.

<img
src="https://github.com/user-attachments/assets/7a10c3cf-8bb3-4b88-aacc-732b678bee19"
alt="image" height="270px" />

<img
src="https://github.com/user-attachments/assets/4d16e98f-9d7a-45f6-8701-d6652e411d3b"
alt="image" height="270px" />

Future:

When a docked terminal is in a zoomed state and Zed is loaded, we should
prioritize focusing on the terminal over the active item (e.g., an
editor) behind it. This hasn't been implemented in this PR because the
zoomed state during the load function is stale. The correct state is
received later via the workspace. I'm still investigating where exactly
this should be handled, so this will be a separate PR.

cc: @SomeoneToIgnore 

Release Notes:

- Fixed unresponsive buttons on load until the center pane is clicked.  
- Added auto-focus for the docked terminal on load when no other item is
focused.

tims created

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