Commit log

fe7d53c Dynamicer builds (#13074)

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

Note that, contrary to the issue's text, we're still shipping a
statically bundled sqlite3 after this PR. We use enough new features of
sqlite, like `sqlite3_error_offset` and `STRICT`, that our minimum
version (v3.38.0) is higher than is presumably accessible on Ubuntu.

Release Notes:

- N/A

---------

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

Conrad Irwin and Mikayla created

edca195 assistant: Fix gutter width (#13373)

Click to expand commit body
The gutter width of the assistant panel was wider then expected after
#13329 was merged.

Release Notes:

- N/A

Bennet Bo Fenner created

d3b3e07 Make Claude 3.5 the default Anthropic model (#13324)

Click to expand commit body
Release Notes:

- N/A

Co-authored-by: Antonio Scandurra <me@as-cii.com>

Sean Billig and Antonio Scandurra created

6b04b66 settings: Load `.zed/settings.json` even if .gitignored (#13370)

Click to expand commit body
This fixes #4432 by ensuring that we scan & watch the `.zed` folder,
just like we watch the `.git`, for changes.

Release Notes:

- Settings are now loaded from local `.zed/settings.json` files even if
they are `.gitignore`d.
([#4432](https://github.com/zed-industries/zed/issues/4432)).

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

Thorsten Ball and Bennet created

4072ad2 Add support for Claude 3.5 Sonnet (#13371)

Click to expand commit body
Release Notes:

- Added support for Claude 3.5 Sonnet.

Antonio Scandurra created

cb0b8b4 Introduce multi-cursor inline transformations (#13368)

Click to expand commit body
https://github.com/zed-industries/zed/assets/482957/591def34-e5c8-4402-9c6b-372cbca720c3

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>

Antonio Scandurra and Richard Feldman created

c58a8f1 linux/x11: Add more debug info to error if opening window fails (#13364)

Click to expand commit body
Release Notes:

- N/A

Thorsten Ball created

abb4647 assistant: Include diagnostics in slash commands by default (#13359)

Click to expand commit body
Include error diagnostics by default for the following slash commands:
`/file`, `/tabs`, `/active`

Release Notes:

- N/A

Bennet Bo Fenner created

9bdb154 snippets: Read user settings for workspace configuration (#13356)

Click to expand commit body
Fixes #13334

Use `settings` field in `lsp` subsettings to fix up the settings as
wish:
```
  "lsp": {
    "snippet-completion-server": {
      "settings": {
        "max_completion_items": 20, 
        "snippets_first": false,
        "feature_words": true,
        "feature_snippets": true,
        "feature_paths": true,
        "feature_unicode_input": false
      }
    }
  }
```


Release Notes:

- N/A

Piotr Osiewicz created

f69c8ca linux/x11: Reduce input latency and ensure rerender priority (#13355)

Click to expand commit body
This change ensures that we always render a window according to its
refresh rate, even if there are a lot of X11 events.

We're working around some limitations of `calloop`. In the future, we
think we should revisit how the event loop is implemented on X11, so
that we can ensure proper prioritization of input events vs. rendering.

Release Notes:

- N/A

Co-authored-by: Antonio <me@as-cii.com>

Thorsten Ball and Antonio created

04a7978 assistant: Include worktree name in diagnostics slash command (#13354)

Click to expand commit body
Files included with the diagnostics command now include the worktree
name, making it more consistent with the way other commands work
(`/active`, `/tabs`, `/file`). Also, the diagnostics command will now
insert nothing when there are no diagnostics.

Release Notes:

- N/A

Bennet Bo Fenner created

4dd05a8 YAML: set auto_indent_using_last_non_empty_line to false (fix wonky formatting) (#13351)

Click to expand commit body
This makes us treat yaml like other indentation-sensitive languages
(e.g. Python) and not reformat it on pasting and what not.

Fixes #12236
Fixes #13338

Release Notes:

- Fixed spurious appliance of auto-formatting to YAML blocks.

Piotr Osiewicz created

44c479c Add a setting to increase the thickness of the active indent guide (#13210)

Click to expand commit body
Resolves #12312.

Release Notes:

- Added an option to configure the line width of the active indent guide
[#12312](https://github.com/zed-industries/zed/issues/12312)

Stanislav Alekseev created

c870997 Dealing with missing arm architectures (#13349)

Click to expand commit body
![image](https://github.com/zed-industries/zed/assets/19868292/341bf8c6-4586-4d51-8889-2c706dc98f6f)

"AArch64" and "ARM64" refer to the same thing.

AArch64 is the 64-bit state introduced in the [Armv8-A
architecture](https://en.wikipedia.org/wiki/ARM_architecture_family#Armv8-A).
The 32-bit state which is backwards compatible with Armv7-A and previous
32-bit Arm architectures is referred to as AArch32. Therefore the GNU
triplet for the 64-bit ISA is aarch64. The Linux kernel community
[chose](https://lkml.org/lkml/2012/7/6/624) to call their port of the
kernel to this architecture arm64 rather than aarch64, so that's where
some of the arm64 usage comes from.

The Apple-developed backend for AArch64 was called "ARM64" whereas the
LLVM community-developed backend was called "AArch64" (as it is the
canonical name for the 64-bit ISA). The two were merged [in
2014](https://www.phoronix.com/news/MTY5ODk) and the backend now is
called "AArch64".

Remote Normal


![image](https://github.com/zed-industries/zed/assets/19868292/f8c5505a-f455-45a6-83bd-230054f8aebd)


Release Notes:

- N/A

0x2CA created

f78f6a6 Add Markdown Preview shortcut to Atom keymap (#13313)

Click to expand commit body
This patch maps `Ctrl+Shift+M` to "Open Markdown Preview to the side".

That's what it used to be in Atom:
https://github.com/atom/markdown-preview

Release Notes:

- Added Markdown Preview shortcut for the Atom keymap

Adam Soutar created

fefc91c Improve code folding to exclude folding line breaks in whitespace-sensitive languages (#13108)

Click to expand commit body
<img width="1219" alt="Screenshot 2024-06-16 at 15 43 31"
src="https://github.com/zed-industries/zed/assets/87859239/dd05de16-7f20-4c88-9e95-021555b8b78b">
<img width="1219" alt="Screenshot 2024-06-16 at 15 45 10"
src="https://github.com/zed-industries/zed/assets/87859239/b1b78cdd-f34d-4ea3-9728-4741727a9643">

Updated the foldable_range method to exclude folding line breaks during
code folding in whitespace-sensitive languages like Python and YAML.
This adjustment ensures that folding behaves as expected, similar to
other code editors.

Ref #11614

Release Notes:

- Improved code folds to ignore trailing newlines

Nigel Jose created

3076567 workspace: Add clear notifications command (#13320)

Click to expand commit body
Release Notes:

- Added the `workspace: clear all notifications` command to clear
notifications
([#10761](https://github.com/zed-industries/zed/issues/10761))


https://github.com/zed-industries/zed/assets/30776250/36f2c3f3-5b5e-4f98-9418-8806ce311504

loczek created

6eb5376 editor: Add scroll_beyond_last_line setting (#11155)

Click to expand commit body
Add `scroll_beyond_last_line` setting with 3 options: 

- `one_page`: The default (current) behaviour of scrolling one more page
beyond the last line.
<img width="568" alt="SCR-20240429-sxry"
src="https://github.com/zed-industries/zed/assets/126383/1effbee9-759f-4858-9022-83bbb208ef82">

- `off`: No scrolling beyond the last line. 
<img width="568" alt="SCR-20240429-syhv"
src="https://github.com/zed-industries/zed/assets/126383/5391b1d7-918d-43f3-8a6f-7642ef32d174">

- `vertical_scroll_margin`: Scroll beyond the last line by the same
number of lines as `vertical_scroll_margin`. Matches the behaviour of
keyboard scrolling.
<img width="568" alt="SCR-20240429-sypc"
src="https://github.com/zed-industries/zed/assets/126383/bb9cc928-e515-4503-88f7-e434c45d742f">

Release Notes:

- Added `scroll_beyond_last_line` setting
([#4962](https://github.com/zed-industries/zed/issues/4962)).

Evan Liu created

40eb841 Update linux build documentation (#13335)

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

Release Notes:

- N/A

Mikayla Maki created

51601cf Docs: Specify the location of the tasks.json files (#13333)

Click to expand commit body
- Docs: Tasks: Explicitly note the location of `tasks.json` files.
- Docs: Keybindings: Add link to task docs showing example of binding to
a specific task.

Release Notes:

- N/A

Peter Tripp created

2c545ce assistant: Improve discoverability of slash command errors (#13331)

Click to expand commit body
https://github.com/zed-industries/zed/assets/53836821/fca5deef-3a4b-4670-8b92-79f052ea8417



Release Notes:

- N/A

Bennet Bo Fenner created

58e9952 tasks: Allow disabling runnables in the gutter (#13329)

Click to expand commit body
Runnables can now be disabled with:
```
  "gutter": {
    "runnables": false
  }
```
Fixes #13280



Release Notes:

- Added `gutter.runnables` setting that controls whether runnable
indicators are displayed in the gutter.

Piotr Osiewicz created

25c8cf0 windows: Fix Zed/GPUI misinterpreting keycodes + Refactor (#12814)

Click to expand commit body
Release Notes:

- Fixed Zed/GPUI misinterpreting keycodes on non-US keyboards
([#12811](https://github.com/zed-industries/zed/issues/12811)).

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>

agamcsama , Marshall Bowers , and Mikayla Maki created

d501a87 windows: Improve file_finder to support match with unix style path (#12357)

Click to expand commit body
Release Notes:

- Improved file_finder to support match with Unix style path.


Sometimes we may get the Unix style path string, for example the result
of `git status`:

```bash
$ git status
On branch improve-file-finder-match-unix-paths
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   crates/file_finder/src/file_finder.rs
```

For example, from GitHub page:

<img width="760" alt="image"
src="https://github.com/zed-industries/zed/assets/5518/c6fe8d8a-839e-4eef-a162-43b1dde09593">

If we copy that path to file_finder, it will not match any files on
Windows.

## Before

<img width="699" alt="屏幕截图 2024-05-28 001037"
src="https://github.com/zed-industries/zed/assets/5518/2d2d729e-7d27-421b-9a38-cfe4e53cc033">


## After

Use Unix style path:

<img width="689" alt="屏幕截图 2024-05-28 001150"
src="https://github.com/zed-industries/zed/assets/5518/e82dc8d6-bd6c-4b78-bd91-5b5210da73c4">

Use Windows style path:

<img width="629" alt="屏幕截图 2024-05-28 001302"
src="https://github.com/zed-industries/zed/assets/5518/4892019e-b2f4-41aa-bbf7-2f5f8af7aafa">

Jason Lee created

97abf35 linux: Fix icon not being associated with app window (#13165)

Click to expand commit body
This commit fixes the app icon not being correctly associated with the
app window. For example, the app icon is not correctly shown in the dock
(Gnome on Wayland) when Zed is running.

Release Notes:

- N/A

Muhammad Talal Anwar created

0150192 assistant: Add `term` slash command (#13162)

Click to expand commit body
This adds a `term` slash command to the assistant which allows to inject
the latest terminal output into the context.

Release Notes:

- N/A

Bennet Bo Fenner created

710c387 docs: Update installation instructions for MSYS2 (#13251)

Click to expand commit body
Fixes #13229 

Release Notes:

- N/A

---------

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

Nicolò Santilio and Marshall Bowers created

5a6c551 assistant: Make including warnings for the diagnostic command more discoverable (#13323)

Click to expand commit body
This makes the `--include-warnings` argument more discoverable

<img width="651" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/02d32496-ad7a-4670-85ce-eda945c0f1c2">

Release Notes:

- N/A

Bennet Bo Fenner created

d5b0df6 blade: Bump rev to fix GLES (#13114)

Click to expand commit body
Based on the work on GLES support of @kvark, only two pieces were
missing for usable GLES support:
- https://github.com/kvark/blade/pull/125 was upstreamed 2 weeks ago and
is contained in the currently referenced zed-industries/blade fork
- https://github.com/kvark/blade/pull/126 was upstreamed 17 hours ago
and is not contained in the zed-industries fork. As the zed-industries
fork was also upstreamed in https://github.com/kvark/blade/pull/128, we
can switch back to mainline blade.

If you don't want to switch back to mainline blade, please integrate
https://github.com/kvark/blade/pull/126 to your fork.

Release Notes:

- Fix GLES backend (#9581)

Lukas Lihotzki created

4e2a08e Fix missing IME keys when no input handler is set (#13325)

Click to expand commit body
This fixes a bug introduced by
https://github.com/zed-industries/zed/pull/12702, where GPUI would only
generate the correct key events if you had an input handler set.

Release Notes:

- N/A

Mikayla Maki created

c20a1ee auto-updates: Do not poll for updates on dev channel (#13311)

Click to expand commit body
Our dev builds don't have updates and will never have updates, so
instead of polling our servers every time we start a dev instance, let's
disable it for the dev channel.

Release Notes:

- N/A

Thorsten Ball created

f5f73ef Respect workspace order in recent projects (#12844)

Click to expand commit body
<img width="1266" alt="Screenshot 2024-06-10 at 14 33 32"
src="https://github.com/zed-industries/zed/assets/1347854/c75de033-f2c8-4500-8b34-46b5f0260d3d">

This changes the recent projects panel to use the order of paths from
the workspace rather than always being alphanumerical.

This follows the work to introduce manual workspace ordering to ensure
the recent projects paths reflect the order of paths in the main project
panel.

Release Notes:

- Improve the recent project panel by ordering paths using the workspace
order

Elliot Thomas created

d8c93e1 Disable inline assist button when assistant is disabled (#13290)

Click to expand commit body
Release Notes:

- Hide inline assist button when assistant is disabled
([#13289](https://github.com/zed-industries/zed/issues/13289)).

Chung Wei Leong created

95b0609 Add support for auto surround (#13217)

Click to expand commit body
![result](https://github.com/zed-industries/zed/assets/32017007/c400081f-be5d-48fa-994f-90a00e2be359)

In the past, Zed used a single switch called `autoclose` to control both
`autoclose` and `auto_surround` functionalities:
+ `autoclose`: when input '(', append ')' automatically.
+ `auto_surround`: when select text and input '(', surround text with
'(' and ')' automatically.

This PR separates `auto_surround` from `autoclose` to support `<`. 

Previously, if `autoclose` of `<` was set to `false`, `auto_surround`
couldn't be used. However, setting `autoclose` to `true` would affect
the default behavior of simple expression. For example, `a < b` would
become `a <> b`.

For more information, see #13187.

Fix #12898.

Release Notes:

- Added support for `auto_surround`
([#12898](https://github.com/zed-industries/zed/issues/12898)).

ᴀᴍᴛᴏᴀᴇʀ created

963b0c0 linux: Cleanup comments in keymap (#13299)

Click to expand commit body
Release Notes:

- N/A

Thorsten Ball created

558808b docs: Fix a typo in replacement command in vim doc (#13288)

Click to expand commit body
### Changes 

- Fix a typo in the replacement command
- Align command descriptions for better readability

Release Notes:

- N/A

Hugh Do created

4b19eac docs: Explain how to forward keys to the terminal (#13298)

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

Release Notes:

- N/A

Thorsten Ball created

47174ce Add mouse context action to copy permalink (#13247)

Click to expand commit body
<img width="977" alt="Screenshot 2024-06-19 at 00 24 21"
src="https://github.com/zed-industries/zed/assets/5855806/8bdb46ad-2d81-45d0-853b-c1d0cc0fc037">

Selecting the item results in the following link
https://github.com/zed-industries/zed/blob/a8c19ab8958a932fc9b7b66e8a0659bf3e3ebcc2/crates/assets/Cargo.toml#L12
for me.

## Summary

Switching from PyCharm, my number one most missed feature is "Copy
Github link" provided by the Gitlink plugin
(https://plugins.jetbrains.com/plugin/8183-gitlink /
https://github.com/ben-gibson/GitLink). I use this a lot to quickly send
code pointers to teammates.

While digging around, I found that this is basically already
implemented, but wasn't able to find this action exposed anywhere in the
UI.


https://github.com/zed-industries/zed/blob/a8c19ab8958a932fc9b7b66e8a0659bf3e3ebcc2/crates/editor/src/editor.rs#L10343-L10367

Release Notes:

- Added mouse context action to copy permalink to line

Stefan created

0129d4e v0.142.x dev

Joseph T Lyons created

3d4f275 editor: Add SelectPageUp/SelectPageDown actions (#13272)

Click to expand commit body
This adds two new actions to `editor`:

- `editor::SelectPageUp`
- `editor::SelectPageDown`

On Linux they're bound by default to `shift-pageup` and
`shift-pagedown`, which matches VS Code and JetBrains.

Release Notes:

- N/A

Thorsten Ball created

cd2533d linux: Scroll linewise up/down on ctrl-up/ctrl-down (#13269)

Click to expand commit body
This matches the behavior of VS Code and JetBrains.

(Of course I implemented both actions myself before figuring out that we
already have actions to scroll a line up and down.)


Release Notes:

- N/A

Thorsten Ball created

acc9648 haskell: Update author name (#13268)

Click to expand commit body
I updated my Github username, and some bot is now parked at the old
username. I figured I should open a PR to update this.

Referring to the PRs (which show _this_ updated username):
https://github.com/zed-industries/zed/pull/6786,
https://github.com/zed-industries/zed/pull/6995,
https://github.com/zed-industries/zed/pull/7331.

Release Notes:

- N/A

Pocæus created

bc35235 docs: Remove `$` in shell commands (#13266)

Click to expand commit body
This PR removes the `$` from the shell commands in the OCaml docs, as we
don't use them anywhere else.

Release Notes:

- N/A

Marshall Bowers created

2ca83b2 snippets: Bump to 0.0.3, add support for more languages (#13265)

Click to expand commit body
This fixes issues spotted by @eproxus in
https://github.com/zed-industries/zed/pull/13253#issuecomment-2178724849
Release Notes:
 -N/A

Piotr Osiewicz created

ddf0725 assistant: Strip out general website chrome in `/fetch` command (#13264)

Click to expand commit body
This PR updates the `/fetch` command to strip out general website chrome
that likely won't contain content on any websites.

Release Notes:

- N/A

Marshall Bowers created

aff7a83 linux: Forward ctrl-w/ctrl-e to terminal (#13263)

Click to expand commit body
This fixes `ctrl-w` and `ctrl-e` not working in the terminal pane but
instead triggering Zed actions ("close pane" and "search project files"
respectively).

I've added both because I think they're pretty commonly used in
terminals, since they're default Emacs-style keybindings.

But I also didn't want to add more, since it's relatively easy for users
to define themselves which keybindings should be forwarded to the
terminal and which not.

All that's required is adding something like this to the keymap:

```json
{
  "context": "Terminal",
  "bindings": {
    "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"],
    "ctrl-p": ["terminal::SendKeystroke", "ctrl-p"]
  }
}
```
cc @mikayla-maki 

Release Notes:

- N/A

Thorsten Ball created

8524e87 linux/x11: Do panic when unmapping/destroying of X11 window fails (#13262)

Click to expand commit body
We saw this panic come up:

```
called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: Other, error: UnknownError })
core::panicking::panic_fmt
core::result::unwrap_failed
<gpui::platform::linux::x11::window::X11Window as core::ops::drop::Drop>::drop
core::ptr::drop_in_place<gpui::platform::linux::x11::window::X11Window>
core::ptr::drop_in_place<gpui::window::Window>
gpui::app::AppContext::shutdown
gpui::app::AppContext::new::{{closure}}
gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run
gpui::app::App::run
zed::main
std::sys_common::backtrace::__rust_begin_short_backtrace
std::rt::lang_start::{{closure}}
std::rt::lang_start_internal
main
__libc_start_call_main
__libc_start_main_impl
_start
```

I'm not sure where exactly that error comes from, except from the X11
stuff. So let's be defensive and log error and only then tear down
everything.

I _think_ that if the error is repeatable that means we won't close the
window but instead just log errors, but I do think that's better than
panicking right now.

Release Notes:

- N/A

Thorsten Ball created

59c005b snippets: Fix package metadata (#13261)

Click to expand commit body
Release Notes:

- N/A

Piotr Osiewicz created

522692e linux: Quiet some noisy logs when logging to file (#13260)

Click to expand commit body
zbus, naga, and some parts of blade are pretty noisy at the INFO level.
zbus especially dumps large debug dumps into the logs.

So on Linux, when logging to a file, we reduce that noise. That means
one still gets the full firehose when doing `RUST_LOG=info cargo run`,
but not in the logs.


Release Notes:

- N/A

Thorsten Ball created

d665f28 Add language-agnostic snippets (#13253)

Click to expand commit body
Note that right now we can't attach a language server to arbitrary
buffer, which is why I've listed a bunch of languages verbatim.
See
https://github.com/zed-industries/simple-completion-language-server/tree/main
for docs on how to define your snippets. They should be placed in
~/.config/zed/snippets ; `snippets.(toml|json)` file can be used to
define language-agnostic snippets, and any other name (e.g.
`python.toml`) will apply only to buffers of that particular type.

There's https://github.com/rafamadriz/friendly-snippets you can use as a
repository of snippets, for your convenience.

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

Release Notes:
- Added support for snippets via simple-completion-language-server

Piotr Osiewicz created