Commit log

1d512ff Bump to 0.164.2 for @ConradIrwin

Zed Bot created

f0c7d06 Add AutoIndent action and '=' vim operator (#21427)

Click to expand commit body
Release Notes:

- vim: Added the `=` operator, for auto-indent

Co-authored-by: Conrad <conrad@zed.dev>

Max Brunsfeld and Conrad created

061272b Fix panic in autoclosing (#21482)

Click to expand commit body
Closes #14961

Release Notes:

- Fixed a panic when backspacing at the start of a buffer with
`always_treat_brackets_as_autoclosed` enabled.

Conrad Irwin created

8bf1edf Fix ctrl-alt-X shortcuts (cherry-pick #21473) (#21474)

Click to expand commit body
Cherry-picked Fix ctrl-alt-X shortcuts (#21473)

The macOS input handler assumes that you want to insert control
sequences when
you type ctrl-alt-X (you probably don't...).

Release Notes:

- (nightly only) fix ctrl-alt-X shortcuts

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

gcp-cherry-pick-bot[bot] and Conrad Irwin created

c4a4c96 Revert "macos: Add default keybind for ctrl-home / ctrl-end (#21007)"

Click to expand commit body
This reverts commit 614b3b979b7373aaa6dee84dfbc824fce1a86ea8.

Release notes:
- N/A

Conrad Irwin created

b1dc23b Properly handle opening of file-less excerpts (cherry-pick #21465) (#21472)

Click to expand commit body
Cherry-picked Properly handle opening of file-less excerpts (#21465)

Follow-up of https://github.com/zed-industries/zed/pull/20491 and
https://github.com/zed-industries/zed/pull/20469
Closes https://github.com/zed-industries/zed/issues/21369

Release Notes:

- Fixed file-less excerpts always opening instead of activating

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

4b90302 Fix macOS IME overlay positioning (#21416)

Click to expand commit body
Release Notes:

- Improved positioning of macOS IME overlay

---------

Co-authored-by: Richard Feldman <richard@zed.dev>

Conrad Irwin and Richard Feldman created

0afc8b2 Fix dismissing the IME viewer with escape (#21413)

Click to expand commit body
Co-Authored-By: Richard Feldman <richard@zed.dev>

Closes #21392

Release Notes:

- Fixed dismissing the macOS IME menu with escape when no marked text
was present

---------

Co-authored-by: Richard Feldman <richard@zed.dev>

Conrad Irwin and Richard Feldman created

f3932ac Bump to 0.164.1 for @osiewicz

Zed Bot created

9fb2099 workspace: Sanitize pinned tab count before usage (cherry-pick #21417) (#21423)

Click to expand commit body
Cherry-picked workspace: Sanitize pinned tab count before usage (#21417)

Fixes all sorts of panics around usage of incorrect pinned tab count
that has been fixed in app itself, yet persists in user db.

Closes #ISSUE

Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>

gcp-cherry-pick-bot[bot] and Piotr Osiewicz created

862a408 toolchains: Run listing tasks on background thread (cherry-pick #21414) (#21420)

Click to expand commit body
Cherry-picked toolchains: Run listing tasks on background thread
(#21414)

Potentially fixes #21404

This is a speculative fix, as while I was trying to repro this issue
I've noticed that introducing artificial delays in ToolchainLister::list
could impact apps responsiveness. These delays were essentially there to
stimulate PET taking a while to find venvs.

Release Notes:

- Improved app responsiveness in environments with multiple Python
virtual environments

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>

gcp-cherry-pick-bot[bot] and Piotr Osiewicz created

9250d1d Make Markdown images layout vertically instead of horizontally (#21247)

Click to expand commit body
Release Notes:

- Fixed a bug in the Markdown preview where images in the same paragraph
would be rendered next to each other

Mikayla Maki created

389b202 v0.164.x preview

Peter Tripp created

6736806 docs: Move install rustup callup to top of developing-extensions.md (#21239)

Peter Tripp created

ce6782f Use eslint from the fork (#21233)

Click to expand commit body
Part of https://github.com/zed-industries/zed/issues/21220

Microsoft had decided to switch over to a different releasing strategy,
autogenerating all releases and not publishing tarballs anymore.
But it was not enough, and they had also removed old tarballs, including
a relatively old `2.4.4` version release's tarballs, which broke Zed
downloads.
See https://github.com/microsoft/vscode-eslint/issues/1954

This PR uses
https://github.com/zed-industries/vscode-eslint/releases/tag/2.4.4 from
Zed's fork, manually released for the same tag.

This approach is merely a stub before more sustainable solution is
found, and I think we need to pivot into downloading *.vsix from
https://open-vsx.org/extension/dbaeumer/vscode-eslint but this is quite
a change so not done right now.

Release Notes:

- Fixed eslint 404 downloads

Kirill Bulatov created

e865b6c Fix cmd-shift-e (reveal in project panel) to match vscode (#21228)

Click to expand commit body
Release Notes:

- Fixed cmd-shift-e / ctrl-shift-e (`pane::RevealInProjectPanel` /
`project_panel::ToggleFocus`) to better my VSCode behavior

Peter Tripp created

4e720be Add ctrl-w _ and ctrl-w = (#21227)

Click to expand commit body
Closes #ISSUE

Release Notes:

- vim: Add support for `ctrl-w _` and `ctrl-w =`

Conrad Irwin created

f702575 Add support for resizing panes using vim motions (#21038)

Click to expand commit body
Closes #8628

Release Notes:

- Added support for resizing the current pane using vim keybinds with
the intention to follow the functionality of vim
  - "ctrl-w +" to make a pane taller 
  - "ctrl-w -" to make the pane shorter
  - "ctrl-w >" to make a pane wider
  - "ctrl-w <" to make the pane narrower
- Changed vim pre_count and post_count to globals to allow for other
crates to use the vim count. In this case, it allows for resizing by
more than one unit. For example, "10 ctrl-w -" will decrease the height
of the pane 10 times more than "ctrl-w -"
- This pr does **not** add keybinds for making all panes in an axis
equal size and does **not** add support for resizing docks. This is
mentioned because these could be implied by the original issue

---------

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

AidanV and Conrad Irwin created

d75d345 Fix file missing or duplicated when copying multiple items in project panel + Fix marked files not being deselected after selecting a directory (#20859)

Click to expand commit body
Closes #20858

This fix depends on the sanitization logic implemented in PR #20577.
Since that branch may undergo further changes, this branch will be
periodically rebased on it. Once #20577 is merged, the dependency will
no longer apply.

Release Notes:

- Fix missing or duplicated files when copying multiple items in the
project panel.
- Fix marked files not being deselected after selecting a directory on
primary click.
- Fix "copy path" and "copy path relative" with multiple items selected
in project panel.

**Problem**:

In this case, `dir1` is selected while `dir2`, `dir3`, and `dir1/file`
are marked. Using the `marked_entries` function results in only `dir1`,
which is incorrect.

<img height="120"
src="https://github.com/user-attachments/assets/d4d92cc5-c998-4948-9a58-25c4f54167f2"
/>

Currently, the `marked_entries` function is used in five actions, which
all produce incorrect results:

1. Delete (via the disjoint function)
2. Copy 
3. Cut
4. Copy Path
5. Copy Path Relative

**Solution**:

1. `marked_entries` function should not use "When currently selected
entry is not marked, it's treated as the only marked entry." logic.
There is no grand scheme behind this logic as confirmed by piotr
[here](https://github.com/zed-industries/zed/issues/17746#issuecomment-2464765963).
2. `copy` and `cut` actions should use the disjoint function to prevent
obivous failures.
3. `copy path` and `copy path relative` should keep using *fixed*
`marked_entries` as that is expected behavior for these actions.

---

1. Before/After: Partial Copy

Select `dir1` and `c.txt` (in that order, reverse order works!), and
copy it and paste in `dir2`. `c.txt` is not copied in `dir2`.

<img height="170"
src="https://github.com/user-attachments/assets/a09fcb40-f38f-46ef-b0b4-e44ec01dda18"
/>
<img height="170"
src="https://github.com/user-attachments/assets/bb87dbe5-8e2e-4ca4-a565-42be5755ec8a"
/>

---
2. Before/After: Duplicate Copy

Select `a.txt`, `dir1` and `c.txt` (in that order), and copy it and
paste in `dir2`. `a.txt` is duplicated in `dir2`.

<img height="170"
src="https://github.com/user-attachments/assets/6f999d22-3607-48d7-9ff6-2e27494002f8"
/>
<img height="170"
src="https://github.com/user-attachments/assets/b4b6ff7d-0df7-45ea-83e4-50a0acb18457"
/>

---
3. Before/After: Directory Selection

Simply primary click on any file, now primary click on any dir. That
previous file is still marked.

<img height="170"
src="https://github.com/user-attachments/assets/9f1948ce-7445-4377-9733-06490ed6a324"
/>
<img height="170"
src="https://github.com/user-attachments/assets/e78203bc-96ba-424b-b588-c038992a9f0e"
/>

---
4. Before/After: Copy Path and Copy Path Relative

Upon `copy path` (ctrl + alt + c):

Before: Only `/home/tims/test/dir2/a.txt` was copied.
After: All three paths `/home/tims/test/dir2`, `/home/tims/test/c.txt`
and `/home/tims/test/dir2/a.txt` are copied.

This is also how VSCode also copies path when multiple are selected.

<img height="170"
src="https://github.com/user-attachments/assets/e20423ea-1682-4efd-b208-631e2edd3771"
/>

tims created

57e4540 vim: Add "unmatched" motions `]}`, `])`, `[{` and `[(` (#21098)

Click to expand commit body
Closes #20791

Release Notes:

- Added vim ["unmatched"
motions](https://github.com/vim/vim/blob/1d87e11a1ef201b26ed87585fba70182ad0c468a/runtime/doc/motion.txt#L1238-L1255)
`]}`, `])`, `[{` and `[(`

---------

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

Helge Mahrt and Conrad Irwin created

597e5f8 vim: Add indent text object (#21121)

Click to expand commit body
Added support for the popular vim
[indent-text-object](https://github.com/michaeljsmith/vim-indent-object).
This is especially useful in indentation-sensitive languages like
python.

Release Notes:

- vim: Added `vii`, `vai` and `vaI` for selecting
[indent-text-object](https://github.com/michaeljsmith/vim-indent-object)s.

vultix created

6470852 Revert "Styling for Apply/Discard buttons (#21017)"

Click to expand commit body
This reverts commit 884748038e9c99b83b943d4550dd3cf515563071.

Max Brunsfeld created

6dbe2ef docs: Fix default value for `relative_line_numbers` in vim (#21196)

Click to expand commit body
![image](https://github.com/user-attachments/assets/91c00938-f056-4778-8999-6a805bc12247)

Changes:
`true` to `false`

Reasoning:
matches zed default settings as well as the settings changes portion of
the vim docs


![image](https://github.com/user-attachments/assets/cb3240bc-8c55-4802-88c0-dd069992ca30)


![image](https://github.com/user-attachments/assets/747fbe8a-b24c-45f2-b3ab-f09bccdb4ec3)

Release Notes:
- N/A

yoleuh created

8847480 Styling for Apply/Discard buttons (#21017)

Click to expand commit body
Change the "Apply" and "Discard" buttons to match @danilo-leal's design!
Here are some different states:

### Cursor in the first hunk

Now that the cursor is in a particular hunk, we show the "Apply" and
"Discard" names, and the keyboard shortcut. If I press the keyboard
shortcut, it will only apply to this hunk.

<img width="759" alt="Screenshot 2024-11-23 at 10 54 45 PM"
src="https://github.com/user-attachments/assets/68e0f109-9493-4ca2-a99c-dfcbb4d1ce0c">

### Cursor in the second hunk

Moving the cursor to a different hunk changes which buttons get the
keyboard shortcut treatment. Now the keyboard shortcut is shown next to
the hunk that will actually be affected if you press that shortcut.

<img width="749" alt="Screenshot 2024-11-23 at 10 56 27 PM"
src="https://github.com/user-attachments/assets/59c2ace3-6972-4a60-b806-f45e8c25eaae">


Release Notes:

- Restyled Apply/Discard buttons

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>

Richard Feldman , Max , Danilo Leal , Danilo Leal , and Bennet Bo Fenner created

8f1ec3d assistant2: Add a checkbox to control tool use (#21215)

Click to expand commit body
This PR adds a checkbox to the `assistant2` message editor to control
whether tools should be used for a given message.

Release Notes:

- N/A

Marshall Bowers created

fdc17c5 macos: Keybind improvements for binds involving shift (#21207)

Click to expand commit body
Fix cmd-pipe
Remove redudnant jetbrains/sublime keybinds (these exist as `cmd-{` and `cmd-}` under default vscode keymap) and were broken as part of the recent keybind changes.
Remove excess JSON whitespace from tests to make them more readable.

Peter Tripp created

9999c31 Avoid endless loop of the diagnostic updates (#21209)

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

Rust-analyzer with `checkOnSave` enabled will push diagnostics for a
file after each diagnostics refresh (e.g. save, file open, file close).

If there's a file that is not open in any pane and has only warnings,
and the diagnostics editor has warnings toggled off, then

0. rust-analyzer will push the corresponding warnings after initial load
1. the diagnostics editor code registers
`project::Event::DiagnosticsUpdated` for the corresponding file path and
opens the corresponding buffer to read its associated diagnostics from
the snapshot
2. opening the buffer would send `textDocument/didOpen` which would
trigger rust-analyzer to push the same diagnostics
3. meanwhile, the diagnostics editor would filter out all diagnostics
for that buffer, dropping the open buffer and effectively closing it
4. closing the buffer will send `textDocument/didClose` which would
trigger rust-analyzer to push the same diagnostics again, as those are
`cargo check` ones, still present in the file
5. GOTO 1

Release Notes:

- Fixed diagnostics editor not scrolling properly under certain
conditions

Kirill Bulatov created

7d67bb4 Properly use lsp::CompletionList defaults (#21202)

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

Release Notes:

- Fixed incorrect handling of the completion list defaults

Kirill Bulatov created

968ffaa assistant2: Restructure storage of tool uses and results (#21194)

Click to expand commit body
This PR restructures the storage of the tool uses and results in
`assistant2` so that they don't live on the individual messages.

It also introduces a `LanguageModelToolUseId` newtype for better type
safety.

Release Notes:

- N/A

Marshall Bowers created

7e418cc assistant2: Style messages (#21191)

Click to expand commit body
This PR styles the messages in `assistant2` so they don't look quite as
rough:

<img width="1138" alt="Screenshot 2024-11-25 at 8 36 32 PM"
src="https://github.com/user-attachments/assets/9cc423fa-feff-4c69-9d2b-d28970559547">

Release Notes:

- N/A

Marshall Bowers created

f059b6a assistant2: Add support for using tools (#21190)

Click to expand commit body
This PR adds rudimentary support for using tools to `assistant2`. There
are currently no visual affordances for tool use.

This is gated behind the `assistant-tool-use` feature flag.

<img width="1079" alt="Screenshot 2024-11-25 at 7 21 31 PM"
src="https://github.com/user-attachments/assets/64d6ca29-c592-4474-8e9d-c344f855bc63">

Release Notes:

- N/A

Marshall Bowers created

3901d46 Factor tool definitions out of `assistant` (#21189)

Click to expand commit body
This PR factors the tool definitions out of the `assistant` crate so
that they can be shared between `assistant` and `assistant2`.

`ToolWorkingSet` now lives in `assistant_tool`. The tool definitions
themselves live in `assistant_tools`, with the exception of the
`ContextServerTool`, which has been moved to the `context_server` crate.

As part of this refactoring I needed to extract the
`ContextServerSettings` to a separate `context_server_settings` crate so
that the `extension_host`—which is referenced by the `remote_server`—can
name the `ContextServerSettings` type without pulling in some undesired
dependencies.

Release Notes:

- N/A

Marshall Bowers created

321fd19 assistant2: Wire up `assistant2::NewThread` action (#21187)

Click to expand commit body
This PR wires up the `assistant2::NewThread` action so that you can
create new threads.

Release Notes:

- N/A

Marshall Bowers created

cc5daa2 assistant2: Improve tracking of pending completions (#21186)

Click to expand commit body
This PR improves the tracking of pending completions in `assistant2`
such that we actually remove ones that have been completed.

Release Notes:

- N/A

Marshall Bowers created

2b92508 assistant2: Include previous messages in the thread in the completion request (#21184)

Click to expand commit body
This PR makes it so previous messages in the thread are included when
constructing the completion request, instead of only sending up the most
recent user message.

Release Notes:

- N/A

Marshall Bowers created

e7b0047 assistant2: Remove unnecessary `Pane` (#21183)

Click to expand commit body
This PR removes an unnecessary `Pane` that was copied over from
`assistant::AssistantPanel` to `assistant2::AssistantPanel`.

Release Notes:

- N/A

Marshall Bowers created

9ee1aba assistant2: Stream in completion text (#21182)

Click to expand commit body
This PR makes it so that the completion text streams into the message
list rather than being buffered until the end.

Release Notes:

- N/A

Marshall Bowers created

91a565f Simplify BufferStore's local vs remote state (#21180)

Click to expand commit body
This is a pure refactor, motivated by wanting to introduce to the
BufferStore new logic for opening staged and committed changes.

I found the `BufferStoreImpl` trait a little bit confusing, particularly
how the different implementors of the trait held a handle back to the
owning buffer store. I was able to reduce the amount of code
considerably (-78 lines) by using a two-variant enum instead, similar to
what we do for `LspStore`, `WorktreeStore` and `Worktree`.

Release Notes:

- N/A

Max Brunsfeld created

a02684b assistant2: Add rudimentary chat functionality (#21178)

Click to expand commit body
This PR adds in rudimentary functionality for sending messages to the
LLM in `assistant2`.

<img width="1079" alt="Screenshot 2024-11-25 at 1 49 11 PM"
src="https://github.com/user-attachments/assets/5accb749-c034-4fb2-bf55-3ae5bc9529ad">

Release Notes:

- N/A

Marshall Bowers created

bd02b35 Avoid excessive diagnostics refreshes (#21173)

Click to expand commit body
Attempts to reduce the diagnostics flicker, when editing very
fundamental parts of the large code base in Rust.


https://github.com/user-attachments/assets/dc3f9c21-8c6e-48db-967b-040649fd00da

Release Notes:

- N/A

Kirill Bulatov created

28142be Update Luau docs (#21174)

Click to expand commit body
Formatter arguments & Tree-sitter grammar changed.

Release Notes:

- N/A

teapo created

389422c docs: Fix broken link to context servers docs (#21172)

Click to expand commit body
This PR fixes a broken link to the context server docs.

Release Notes:

- N/A

Marshall Bowers created

93533ed Remove assistant hints (#21171)

Click to expand commit body
This reverts #20824 and #20899. After adding them last week we came to
the conclusion that the hints are too distracting in everyday use, see
#21128 for more details.

Release Notes:

- N/A

Bennet Bo Fenner created

385c447 docs: Document context servers (#21170)

Click to expand commit body
This PR adds documentation for context servers.

Release Notes:

- N/A

Marshall Bowers created

b83f104 Do not reuse render cache for nested items whose parents are re-rendered (#21165)

Click to expand commit body
Fixes a bug with terminal splits panicking during writing a command in
the command input

Release Notes:

- N/A

Co-authored-by: Antonio Scandurra <antonio@zed.dev>

Kirill Bulatov and Antonio Scandurra created

08b214d Rename 'chat' to 'thread' in assistant2 (#21141)

Click to expand commit body
Release Notes:

- N/A

Nathan Sobo created

aa58cab Fix offline workspace deserialization with assistant2 (#21159)

Click to expand commit body
Closes #21156 
/cc @maxdeviant 

Release Notes:

- N/A

Piotr Osiewicz created

5b0fa6e Hide AI hints on line ends so we can discuss more (#21128)

Click to expand commit body
@bennetbo @as-cii @mrnugget I'm really not liking the hints about AI on
every line. It feels too distracting to me and damaging to the user
experience. I'm wondering if we can hide them and work with design for
other ideas. Or at least talk it through.

Release Notes:

- N/A

Nathan Sobo created

e85848a pylsp: Prefer version from user venv (#21069)

Click to expand commit body
Closes #ISSUE

Release Notes:

- pylsp will now use version installed in user venv, if one is
available.

Piotr Osiewicz created

20bffaf python: Highlight docstrings for classes and modules (#20486)

Click to expand commit body
Release Notes:

- Add `string.doc` python syntax highlighting to class and module-level
docstrings.

Previously, only docstrings inside python functions were labeled as
`string.doc`, but docstrings can exist at the class or module level too.
This adds the more specific string type for each of those.

*Before*:
<img width="288" alt="image"
src="https://github.com/user-attachments/assets/5a6c4c9d-709c-40e2-8316-31c95084a1a9">

*After*:
<img width="294" alt="image"
src="https://github.com/user-attachments/assets/8212bfa2-2288-4623-aa63-f748a2295ada">

Carroll Wainwright created