Commit log

5154910 windows: Update crate `Windows` from `0.53` to `0.56` (#11662)

Click to expand commit body
Version 0.56 has fixed many of the previous bugs, and one of the bugs
prevent me implementing some functions.

Release Notes:

- N/A

张小白 created

d1ee2d0 wayland: Window controls and drag (#11525)

Click to expand commit body
Based on https://github.com/zed-industries/zed/pull/11046

- Partially fixes #10346 
- Fixes https://github.com/zed-industries/zed/issues/9964

## Features
Window buttons

![image](https://github.com/zed-industries/zed/assets/71973804/1b7e0504-3925-45ba-90b5-5adb55e0d739)

Window drag

![image](https://github.com/zed-industries/zed/assets/71973804/9c509a37-e5a5-484c-9f80-c722aeee4380)

Native window context menu

![image](https://github.com/zed-industries/zed/assets/71973804/048ecf52-e277-49bb-a106-91cad226fd8a)

### Limitations

- No resizing
- Wayland only (though X11 always has window decorations)

### Technical

This PR adds three APIs to gpui.

1. `show_window_menu`: Triggers the native title bar context menu.
2. `start_system_move`: Tells the compositor to start dragging the
window.
3. `should_render_window_controls`: Whether the compositor doesn't
support server side decorations.

These APIs have only been implemented for Wayland, but they should be
portable to other platforms.

Release Notes:

- N/A

---------

Co-authored-by: Akilan Elango <akilan1997@gmail.com>

apricotbucket28 and Akilan Elango created

db89353 git: Support git repos with .git folder above project root (#11550)

Click to expand commit body
TODOs:

- [x] Add assertions to the test to ensure that the git status is
propagated
- [x] Get collaboration working
- [x] Test opening a git repository inside another git repository
- [x] Test opening the sub-folder of a repository that itself contains
another git repository in a subfolder

Fixes:
- Fixes https://github.com/zed-industries/zed/issues/10154
- Fixes https://github.com/zed-industries/zed/issues/8418
- Fixes https://github.com/zed-industries/zed/issues/8275
- Fixes https://github.com/zed-industries/zed/issues/7816
- Fixes https://github.com/zed-industries/zed/issues/6762
- Fixes https://github.com/zed-industries/zed/issues/4419
- Fixes https://github.com/zed-industries/zed/issues/4672
- Fixes https://github.com/zed-industries/zed/issues/5161

Release Notes:

- Added support for opening subfolders of git repositories and treating
them as part of a repository (show git status in project panel, show git
diff in gutter, git blame works, ...)
([#4672](https://github.com/zed-industries/zed/issues/4672)).

Demo video:


https://github.com/zed-industries/zed/assets/1185253/afc1cdc3-372c-404e-99ea-15708589251c

Thorsten Ball created

9f0a202 Report response latency and errors when using (inline) assistant (#11806)

Click to expand commit body
Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: David <davidsp@anthropic.com>

Antonio Scandurra , Nathan , and David created

de09409 Sanitize messages before sending them to Anthropic (#11810)

Click to expand commit body
Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: David <davidsp@anthropic.com>

Antonio Scandurra , Nathan , and David created

69f9489 Don't bundle libdl :facepalm: (#11809)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

652748b gleam: Bump to v0.1.2 (#11803)

Click to expand commit body
This PR bumps the Gleam extension to v0.1.2.

Changes:

- #11476
- #11801

Release Notes:

- N/A

Marshall Bowers created

77f0d35 gleam: Add `gleam test` task (#11801)

Click to expand commit body
This PR adds a task for running `gleam test`.

Release Notes:

- N/A

Marshall Bowers created

5944caa Add support for interacting with Claude in the assistant panel (#11798)

Click to expand commit body
Release Notes:

- Added support for interacting with Claude in the assistant panel. You
can enable it by adding the following to your `settings.json`:

    ```json
    "assistant": {
        "version": "1",
        "provider": {
            "name": "anthropic"
        }
    }
    ```

Antonio Scandurra created

019d988 Add support for gpt-4o when using zed.dev as the model provider (#11794)

Click to expand commit body
Release Notes:

- N/A

Antonio Scandurra created

a13a92f Introduce recent files ambient context for assistant (#11791)

Click to expand commit body
<img width="1637" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/5aaec657-3499-42c9-9528-c83728f2a7a1">

Release Notes:

- Added a new ambient context feature that allows showing the model up
to three buffers (along with their diagnostics) that the user interacted
with recently.

---------

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

Antonio Scandurra and Nathan Sobo created

e4c95b2 Allow using the inline assistant within the assistant panel (#11754)

Click to expand commit body
Release Notes:

- Added the ability to use the inline assistant within the assistant
panel.

Antonio Scandurra created

4766b41 docs: Document how to use custom `api_url` in Assistant (#11790)

Click to expand commit body
This essentially documents the comment here:
https://github.com/zed-industries/zed/issues/4424#issuecomment-2053646583

Release Notes:


- N/A

Thorsten Ball created

95e0d5e tasks: Reorganize task modal (#11752)

Click to expand commit body
![image](https://github.com/zed-industries/zed/assets/24362066/bc7cc3d3-d9fc-4be6-b9b6-e3d8edf5b533)

Release Notes:
- Improved tasks modal by highlighting a distinction between a task
template and concrete task instance and surfacing available keybindings
more prominently. Task templates are now always available in the modal,
even if there's already a history entry with the same label.
- Changed default key binding for "picker::UseSelectedQuery" to `opt-e`.

Piotr Osiewicz created

0a096bf terminal: Fix Alacritty key bindings (#11782)

Click to expand commit body
Close #10502 

Release Notes:

- Fixed `ctrl-space` not being forwarded correctly in the terminal view.
([#10502](https://github.com/zed-industries/zed/issues/10502))

CharlesChen0823 created

ec65035 inline blame: Match icon size to font size in buffer (#11788)

Click to expand commit body
This fixes #11311.


Release Notes:

- Fixed icon in inline git blame entry not changing with the buffer font
size. ([#11311](https://github.com/zed-industries/zed/issues/11311)).

Before:

![screenshot-2024-05-14-10 48
49@2x](https://github.com/zed-industries/zed/assets/1185253/4a288cae-a52b-4bee-8681-f1d9ba3b57f3)

After:

![screenshot-2024-05-14-10 50
06@2x](https://github.com/zed-industries/zed/assets/1185253/f7a6a608-8ecc-4642-adbd-80858dea75e9)

Thorsten Ball created

9b74acc Add GPT-4o as possible model (#11764)

Click to expand commit body
Resolves: #11766

Release Notes:

- Add GPT-4o support (see: https://openai.com/index/hello-gpt-4o/).
GPT-4o is better and faster than 4-turbo, at half the price.

Toon Willems created

43da37b shell: Load SHELL from passwd entry if launched as desktop app (#11758)

Click to expand commit body
This fixes #8794 and other related problems.

The problem, in short, is this: `$SHELL` might be outdated. This code
ensures that we update `$SHELL` to what we can deem the newest version,
if we're started as a desktop application.

The background is that you can get the user's preferred shell in two
ways:

1. Read the `SHELL` env variable
2. Read the `/etc/passwd` file and check which shell is set

Most applications should and do prefer (1) over (2).

Why is it preferred? Reading `SHELL` means that processes can inherit
the variable from each other. And you can do something like
`SHELL=/bin/cool-shell ./my-cool-app`

But what happens if the application was launched from the desktop? Which
SHELL env does it inherit then?

It inherits the env from the process that launched it, which is
Finder.app or launchd or GNOME or something else — these are all
long-running processes that get their environment when the user logs in.

They do *not* get a new environment unless restarted (either process
restarted or computer restarted)

That means the `SHELL` env variable they have might be outdated.

That's a problem if you, for example, change your shell with `chsh` and
then launch the app from the desktop.

That change of the default shell is not reflected in the app if the app
only reads from SHELL. Because that hasn’t been updated. Instead it
should read from passwd file to get the newest value.



Release Notes:

- Fixed SHELL being outdated if Zed was launched via Finder or Raycast
or other desktop launchers.
([#8794](https://github.com/zed-industries/zed/issues/8794))

Thorsten Ball created

15e1895 Try some more linker magic to get it working on ubuntu 20 (#11784)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

aee00d4 Fix script/bundle-linux (#11783)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

172cb81 xtask: Check for licenses that are duplicated instead of being symlinked (#11777)

Click to expand commit body
This PR updates `cargo xtask licenses` to also check for license files
that are not symlinks.

Release Notes:

- N/A

Marshall Bowers created

b01878a Add `xtask` for finding crates with missing licenses (#11776)

Click to expand commit body
This PR adds a new `cargo xtask licenses` command for finding crates
with missing license files.

A number of crates were uncovered that were missing a license file, and
have had the appropriate license file added.

Release Notes:

- N/A

Marshall Bowers created

ff2eace Add missing LICENSE file to `http` crate (#11773)

Click to expand commit body
This PR adds a missing LICENSE file to the recently-extracted `http`
crate.

Release Notes:

- N/A

Marshall Bowers created

fcd5fa9 Remove selection highlights from deleted diff editors on blur (#11772)

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

Release Notes:

- Removed extra line highlights when deleted diff editors loose focus

Kirill Bulatov created

cb34507 docs: Fix typos on the Assistant Panel page (#11725)

Click to expand commit body
Fix typos on the Assistant Panel page, also including removal of
unnecessary commas and standardization to US English.

Release Notes:

- N/A

PS: Assuming here US English is the preferred style (e.g., "canceled"
vs. "cancelled".) Happy to revert if that's not the case! :)

Danilo Leal created

1ab2477 Add Tool Strip (#11756)

Click to expand commit body
Release Notes:

- N/A

---------

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

Nate Butler and Marshall Bowers created

335636c ruby: Bump to v0.0.2 (#11769)

Click to expand commit body
This PR bumps the Ruby extension to v0.0.2.

Changes:

- #11768

Release Notes:

- N/A

Marshall Bowers created

24cc4c6 ruby: Add ruby-lsp as an experimental language server (#11768)

Click to expand commit body
Adds [ruby-lsp](https://shopify.github.io/ruby-lsp/) as an alternative
LS for Ruby language.
While support for fully functional `ruby-lsp` is limited due to some
limitations (see https://github.com/zed-industries/zed/pull/8613) I
think it's OK to add it but disable by default. Thanks!

Resolves #4834.

Release Notes:

- N/A

### Some screenshots

Completion support
![CleanShot 2024-05-13 at 22 58
23@2x](https://github.com/zed-industries/zed/assets/1894248/d5047baa-c58f-465d-ae31-a7045aa56adf)

Symbol search
![CleanShot 2024-05-13 at 23 03
59@2x](https://github.com/zed-industries/zed/assets/1894248/0cb6320a-b000-4a0c-85eb-f8d1a8f6936e)

---------

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

Vitaly Slobodin and Marshall Bowers created

9af1298 Bundle linux deps (#11681)

Click to expand commit body
Inlcude linux deps in the bundle

Release Notes:

- N/A

Conrad Irwin created

8e92f19 editor: Current line highlight options (#11710)

Click to expand commit body
None:

<img width="717" alt="none"
src="https://github.com/zed-industries/zed/assets/2101250/b2a741db-c64a-4275-a612-5a0d15c9cab7">

Gutter:

<img width="715" alt="gutter"
src="https://github.com/zed-industries/zed/assets/2101250/f7a68a6e-6eba-41b4-9042-5a5fe2ee21a4">

Line:

<img width="717" alt="line"
src="https://github.com/zed-industries/zed/assets/2101250/117f5b00-abd7-425b-8047-1a6fab8293a7">

All:

<img width="715" alt="all"
src="https://github.com/zed-industries/zed/assets/2101250/ebccc0da-0fa0-44e5-903c-cc49d975db76">

This PR adds the `current_line_highlight` setting that defines how to
highlight the current line in the editor:

- `none`: Don't highlight the current line.
- `gutter`: Highlight the gutter area only.
- `line`: Highlight the editor area only.
- `all` (default): Highlight the whole line.

The options have been borrowed from VSCode.

Fixes #5222
Part of #4382

Release Notes:

- Added the `current_line_highlight` setting that defines how to
highlight the current line in the editor (#5222).

Andrew Lygin created

cf97b99 Fix panic when accepting completions (#11762)

Click to expand commit body
Release Notes:

- Fixed a panic caused by missing bounds check in completion handler

Conrad Irwin created

bc29218 Fix key-bindings.md example (#11415)

Click to expand commit body
Fixed obselete command name in keymap example.
From "zed::OpenKeyMap" to "zed::OpenKeymap".



Release Notes:

- N/A

sebbeutler created

2e8197c docs: Standardize "Note" blockquote usage (#11724)

Click to expand commit body
Standardize the blockquote "Notes" usage, so all places are using the
`>` blockquote notation, as well as a consistent style for the "Note"
word.

PS: Thought that bolding the word "**Note**" would make for a higher
visual distinction, so went for it in all existing cases! No strong
feelings, though; happy to roll back to just "Note:" if that's
preferrable!

Release Notes:

- N/A

Danilo Leal created

7613933 vue: Bump to v0.0.2 (#11747)

Click to expand commit body
This PR bumps the Vue extension to v0.0.2.

Changes:

- #11743

Release Notes:

- N/A

Marshall Bowers created

c769d58 vue: Fix Vue.js language server not starting (#11743)

Click to expand commit body
This fixes #10871.

The introduction of #11412 broke Vue.js language support, since it made
Zed rely more heavily on correct language name -> language ID mappings,
which the Vue.js extension didn't have.

Release Notes:

- N/A

Thorsten Ball created

c90263d editor: Use proper rows for fold indicators in the gutter (#11741)

Click to expand commit body
Follow-up to #11656

Release Notes:

- N/A

---------

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

Piotr Osiewicz and Kirill created

1afcd12 snippets: Fix <tab> not working when at end of snippet (#11740)

Click to expand commit body
This fixes #10185 by not keeping snippet state around when already at
the end of the snippet and the tabstop is empty (i.e. it's not a
selection) and we're already on it.

The reason for the fix is outlined in the comments of #10185 but to
repeat:

1. `gopls` sends completions with type "snippet" even when suggesting
single word completions that don't contain tabstops
2. We use a default behavior and add an "end tabstop" by default so that
the cursor jumps to the end of the snippet when accepting it.
3. We'd then push the state of the snippet on the stack which is where
it would stay, with the cursor already at the end and the user unable to
get rid of the tabstop state.

This fixes the issue by not pushing snippet state when the tabstop we
accepted is the "end tabstop".

Release Notes:

- Fixed completions inside snippets breaking the jump-to-next-tabstop
behaviour when using Go/`gopls`
([#10185](https://github.com/zed-industries/zed/issues/10185)).

Demo:



https://github.com/zed-industries/zed/assets/1185253/35384e5e-45c6-46ab-870d-b48e56d8786b

Thorsten Ball created

6df1bc8 Fix runnable, code_actions button can not trigger when editor not focused (#11729)

Click to expand commit body
## Before


https://github.com/zed-industries/zed/assets/5518/546450fc-ad2c-45d0-8bdb-7b15cfebe235

## After


https://github.com/zed-industries/zed/assets/5518/efc4f863-9db1-4846-83ae-c99ae4dcb3ed

Release Notes:

- Fixed code actions/runnable buttons not triggering when editor is not focused.

Jason Lee created

91b9e4e git blame: add "Open permalink" to right-click menu (#11734)

Click to expand commit body
This adds a new option to the right click menu for git blame entries in
the gutter: "Open permalink". If there is a URL for the code host, then
this will open it.

Release Notes:

- Added "Open permalink" option to right-click menu of git blame entries
in gutter.

Demo:

![screenshot-2024-05-13-09 39
48@2x](https://github.com/zed-industries/zed/assets/1185253/656c177c-79f0-4a40-8838-7e963d099479)

Thorsten Ball created

8dd2655 docs: Fix broken link (#11685)

Click to expand commit body
configuration link in `javascript.md`

https://zed.dev/docs/languages/javascript

Release Notes:

- N/A

Gu created

78f1482 Add autosave with delay (#11325)

Click to expand commit body
Implemented autosave functionality with a delay, which now refrains from
formatting the code upon triggering unless the user manually saves it.
Additionally, enhanced documentation for the `format_on_save` setting
has been added. This resolves the issue where autosave with delay would
inadvertently format the code, disrupting the user experience, as
reported in the corresponding issue.

Release Notes:

- Fixed a bug where autosave after_delay would auto-format the buffer
([#9787](https://github.com/zed-industries/zed/issues/9787)).

---------

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

João Miguel Nogueira and Conrad Irwin created

9fdfe5c Don't hide last symbol under the scrollbar (#11696)

Click to expand commit body
This PR adds an extra scrollbar-wide margin to the right side of the
editor. This prevents hiding the last character under the scrollbar.

Fixes #7098

Release Notes:

- Fixed hiding of the last character under the scrollbar (#7098).

Andrew Lygin created

4446c38 docs: Add link for "Configuring Zed" mention (#11723)

Click to expand commit body
Release Notes:

- N/A

Danilo Leal created

692afdc Remove deploy artifacts after uploads (#11726)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

6657e30 Update reference to keymap.json in tasks docs (#11711)

Click to expand commit body
I assume this was an older file name or just a typo as I can't find any
other references to a `keybindings.json` file. Either way it was
confusing for a bit :)

Release Notes:

- N/A

Erik Simmler created

f990f70 Bring the Tool Calling README up to date (#11683)

Kyle Kelley created

f550f23 vim test redux (#11709)

Click to expand commit body
This cleans up the neovim-backed vim tests:
- removed exempted tests (we'll rely on bug reports to find missing edge
cases)
- moved all assertions into non-async fn's so that failures are
reporting on the right file/line
- removed the NeovimBackedBindingTestContext
- renamed a few things to make them clearer
- reduced the number of permutations tested in some cases to reduce
slowest test from 60s to 5s

Release Notes:

- N/A

Conrad Irwin created

48cba32 Revert "Use sha in the names of Linux nightly archives (#11693)"

Click to expand commit body
This reverts commit 6a64360ec82d5309890e042c5305edfebb9ae59a.

Kirill Bulatov created

6a64360 Use sha in the names of Linux nightly archives (#11693)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

fa04f75 chore: Improve dev build startup time (#11692)

Click to expand commit body
RustEmbed repeatedly compiled regexes for handling of
'include='/'exclude' statements in a hot loop, which caused each call to
Assets::iter() to take 600ms. Since it is being called twice on our
startup path, that alone contributed over a second to startup time in
debug builds. I've filed a PR with them
https://github.com/pyrossh/rust-embed/pull/244 which brings down the
time for a single iter() call to 6ms.

Release Notes:

- N/A

Piotr Osiewicz created