Commit log

eadb454 zed 0.141.3

Peter Tripp created

bfa2682 Fix a stupid bug that was dropping system prompts for Claude (#13626)

Click to expand commit body
Release Notes:

- Fixed a bug that was causing system prompts to be dropped for
Anthropic models.

@JosephTLyons @notpeter We probably need to hot-fix this as I'm pretty
sure this affects the regular anthropic provider in addition to just the
feature-flagged cloud stuff. Wouldn't mind confirming that first so we
can communicate around it. 😬

Nathan Sobo created

8a8e295 fix panics (cherry-pick #13554) (#13557)

Click to expand commit body
Cherry-picked fix panics (#13554)

Release Notes:

- Fixed a panic when editing HTML near the end of a file
- Fixed a panic when editing settings.json from inside the .zed
directory

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

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

3e609e4 v0.141.x stable

Peter Tripp created

fce2e00 Add metrics_id to editor_events (#13525)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

20edf69 Bump to 0.141.2 for @osiewicz

Zed Bot created

d3c2699 editor: Select first match in "Find all references" editor (#13424)

Click to expand commit body
Previously we've placed cursor on the first line of the first excerpt in
the multibuffer, but alas,
https://x.com/fasterthanlime/status/1804883499809165473 happened (j/k,
this feedback is totally valid) and now we're gonna place it at the end
of the first reference. As a bonus, with the old configuration `editor:
select next` tripped over itself. Now it's possible (& feasible) to do a
"select next" in "find all references"; consecutive referenced ranges
will be selected.

Fixes #13419



Release Notes:

- Fixed a bug where "Find all references" editor had cursor placed on
the first line of the first excerpt in the multibuffer instead of having
it on the first reference.

Piotr Osiewicz created

fbeaa70 Fix: Picker select_last not scrolling to item index (cherry-pick #13393) (#13410)

Click to expand commit body
Cherry-picked Fix: Picker select_last not scrolling to item index
(#13393)

Release Notes:

- Fix: Command palette not scrolling down to the last element

Co-authored-by: Vitor Ramos <ramos.vitor89@gmail.com>

gcp-cherry-pick-bot[bot] and Vitor Ramos created

11b4570 Bump to 0.141.1 for @osiewicz

Zed Bot created

c844ba3 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

3562cad v0.141.x preview

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

8c4fb34 Show location of log file when using `zed: open log` (#13252)

Click to expand commit body
This changes the breadcrumb header from "untitled" to "Last 1000 lines
in <location of log file>".

Reason is that it's been incredibly frustrating not seeing the location
of the log file there and not seeing that it's actually a truncated
version of the logs.

This is one remedy for that.

Other options considered:

1. Opening the actual log file. Turns out that is huge. On Linux right
now it's 5 megabyte after 5 minutes.
2. Opening the file and adding it on the buffer. That is tricky and
weird, because you have to modify the underlying buffer and set the
file, after having to add it to the workspace and getting its entry,
etc.
3. Setting a `display_file_path` on Buffer. That would require also
adding it on `BufferSnapshot` and then threading that through so that it
gets returned by the multi-buffer and then in the editor. And ultimately
this here is a "view concern", so we thought we just add it as such.

So yes, not the best change possible, but it's not that invasive and
makes it clear that it's a view-only concern.

Release Notes:

- N/A

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

Thorsten Ball and Kirill created

d4891a6 Conform to wayland spec on resize (#13243)

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

Release Notes:

- N/A

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

Mikayla Maki and conrad created

17bc0d1 Dynamically link libwayland (#13241)

Click to expand commit body
Fixes a bug in current nightly.

Release Notes:

- N/A

Mikayla Maki created

db0d843 Allow completing slash command arguments from extensions (#13240)

Click to expand commit body
This PR extends the extension API with support for completing slash
command arguments for slash commands defined in extensions.

Release Notes:

- N/A

Marshall Bowers created

ad4e528 Make slash commands defined in extensions return `SlashCommandOutput` (#13237)

Click to expand commit body
This PR extends the interface for slash commands defined in extensions
to have them return `SlashCommandOutput`.

This allows for slash commands to return multiple output sections for a
single piece of generated text.

Note that we don't allow specifying the icon to display in the
placeholder, as we don't want to commit to that in our API at the
moment.

Release Notes:

- N/A

Marshall Bowers created

ca18549 Keyboardable buttons in linux alerts (#13235)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

5cbb360 zed_extension_api: Add default implementation for `language_server_command` (#13234)

Click to expand commit body
This PR adds a default implementation for the `language_server_command`
method on the `Extension` trait.

This will allow for extensions to be defined without having to implement
this method, which will be useful for extensions that may just want to
provide slash commands.

Release Notes:

- N/A

Marshall Bowers created

5ff7c89 Fix panic trying to go to next of 0 matches (#13233)

Click to expand commit body
Release Notes:

- Fixed a panic when going to next search result when there are none

Conrad Irwin created

99e4b3a Add linux arm support to installer (#13231)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

9af4b6b Allow telemetry from unofficial builds (#13224)

Click to expand commit body
Release Notes:

- N/A

Co-authored-by: Peter Tripp <notpeter@users.noreply.github.com>

Joseph T. Lyons and Peter Tripp created

c84d432 Fix modality indicators in user menu (#13228)

Click to expand commit body
This PR updates the modality indicators in the user menu after #12940.

We use the ellipsis throughout the app to indicate that a menu action
will open a modal (e.g., the theme selector), so "Themes" needs the
trailing ellipsis.

Whereas the "Extensions" entry opens up a new tab, which we don't
indicate that same way.

Release Notes:

- N/A

Marshall Bowers created

6cea981 Stop using xtask for clippy (#13223)

Click to expand commit body
This fixes an extra 10 second delay when needing to recompile xtask, and
allows passing arbitrary clippy args (like --allow-dirty)

Release Notes:

- N/A

Conrad Irwin created

490a75a Fix bug where window contents could appear outside of window bounds on X11 (#13181)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

4f364d6 Hide old linux panics (#13221)

Click to expand commit body
Remove noise from the #panics channel by excluding any linux build
before
0.139.x. We filter on the os_version and os_name because evern older
versions
of linux set app_version = 1.0.0.

Release Notes:

- N/A

Conrad Irwin created

89d2ace Make LSP task cancellation discoverable (#13226)

Click to expand commit body
Release Notes:

- Added the ability to cancel a cargo check by clicking on the status
bar item.

Max Brunsfeld created

84a44be storybook: Use `theme::setup_ui_font` helper function (#13227)

Click to expand commit body
This PR updates the storybook to use the new `theme::setup_ui_font`
helper function to initialize the UI font.

Release Notes:

- N/A

Marshall Bowers created

6b9ddbf Add more menus to Zed (#12940)

Click to expand commit body
### TODO

- [x] Make sure keybinding shows up in pane + menu
- [x] Selection tool in the editor toolbar
- [x] Application Menu
- [x] Add more options to pane + menu
   - Go to File...
  - Go to Symbol in Project... 
- [x] Add go items to the selection tool in the editor:
   - Go to Symbol in Editor...
   - Go to Line/Column...
   - Next Problem
   - Previous Problem
- [x] Fix a bug where modals opened from a context menu aren't focused
correclty
- [x] Determine if or what needs to be done with project actions:
- Difficulty is that these are exposed in the UI via clicking the
project name in the titlebar or by right clicking the root entry in the
project panel. But they require reading and are two clicks away. Is that
sufficient?
    - Add Folder to Project
    - Open a new project
    - Open recent
 - [x] Get a style pass 
 - [x] Implement style pass
   - [x] Fix the wrong actions in the selection menu
   - [x] Show selection tool toggle in the 'editor settings' thing
- [x] Put preferences section from the app menu onto the right hand user
menu
- [x] Add Project menu into app menu to replace 'preferences' section,
and put the rest of the actions there
- [ ] ~~Adopt `...` convention for opening a surface~~ uncertain what
this convention is.
   - [x] Adopt link styling  for webview actions
   - [x] Set lucide hamburger for menu icon
   - [x] Gate application menu to only show on Linux and Windows




Release Notes:

- Added a 'selection and movement' tool to the Editor's toolbar, as well
as controls to toggle it and a setting to remove it (`"toolbar":
{"selections_menu": true/false }`)
- Changed the behavior of the `+` menu in the tab bar to use standard
actions and keybindings. Replaced 'New Center Terminal' with 'New
Terminal', and 'New Search', with the usual 'Deploy Search'. Also added
item-creating actions to this menu.
- Added an 'application' menu to the titlebar to Linux and Windows
builds of Zed

Mikayla Maki created

8af8493 typescript: Make VTSLS the default language server for Typescript (#13140)

Click to expand commit body
Additionally, limit # of returned completion items + use fuzzy filtering
on VTSLS side. Prime LSP handler for response handling.


Release Notes:

- VTSLS is now a default language server for TypeScript, TSX, and
JavaScript.

Piotr Osiewicz created

39edbe1 Update `.mailmap` (#13219)

Click to expand commit body
This PR updates the `.mailmap` file to merge some commit authors using
multiple emails.

Release Notes:

- N/A

Marshall Bowers created

f6fa660 wayland: Refactor clipboard implementation (#12405)

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

Replaces the `copypasta`/`smithay-clipboard` implementation with a new,
custom one

TODO list:

- [x] Cleanup code
- [x] Remove `smithay-clipboard`
- [x] Add more mime types to the supported list

Release Notes:

- Fixed drag and drop on Gnome
- Fixed clipboard paste on Hyprland

apricotbucket28 created

b55961b ruby: Update tree-sitter grammar version (#13216)

Click to expand commit body
Hi, this pull request just updates the `tree-sitter` version for the
Ruby language. I checked the changelog and it doesn't contain breaking
changes. Thanks.

tree-sitter/tree-sitter-ruby@9d86f3761bb3 ->
tree-sitter/tree-sitter-ruby@dc2d7d6b50f9


Release Notes:

- N/A

Vitaly Slobodin created

01b836a util: Replace `lazy_static!` with `OnceLock` (#13215)

Click to expand commit body
This PR replaces the `lazy_static!` usages in the `util` crate with
`OnceLock` from the standard library.

This allows us to drop the `lazy_static` dependency from this crate.

Release Notes:

- N/A

Marshall Bowers created

41180b8 util: Remove leftover `http` module (#13214)

Click to expand commit body
This PR removes a leftover `http` module in `util` that was lingering
from #11680.

Release Notes:

- N/A

Marshall Bowers created

81475ac paths: Replace `lazy_static!` with `OnceLock` (#13213)

Click to expand commit body
This PR replaces the `lazy_static!` usages in the `paths` crate with
`OnceLock` from the standard library.

This allows us to drop the `lazy_static` dependency from this crate.

The paths are now exposed as accessor functions that reference a private
static value.

Release Notes:

- N/A

Marshall Bowers created

ba59e66 Improve Python syntax highlighting (#12868)

Click to expand commit body
Release Notes:

- Improve syntax highlighting in Python #12578 

Before:
<img width="1181" alt="Screenshot 2024-06-08 at 01 44 54"
src="https://github.com/zed-industries/zed/assets/87859239/0b8ab26b-149b-477e-af08-8cd9f2b1c117">

After:

<img width="1184" alt="Screenshot 2024-06-10 at 01 02 35"
src="https://github.com/zed-industries/zed/assets/87859239/a319a5ea-54b7-4681-951d-130ea26aa390">

---------

Co-authored-by: Joseph T Lyons <JosephTLyons@gmail.com>

Nigel Jose and Joseph T Lyons created

5ede483 GitHub Issue Templates: Hide Zed Logs (#13211)

Click to expand commit body
Add details/summary block to GitHub issue templates so zed.log can be
hidden by default.

The diff for this is messy because the existing files were not correctly
auto-formatted. So I created two commits, one for autoformat and the
other for the changes.

I tested it on a private repo. When you first open the issue it looks
like this:
<img width="879" alt="image"
src="https://github.com/zed-industries/zed/assets/145113/07cda992-4d62-4c27-abaa-5c272ff65345">

Then when you double-click inside it becomes editable:
<img width="880" alt="image"
src="https://github.com/zed-industries/zed/assets/145113/970c6669-84da-41d1-9119-d3eb9b090066">
 

Release Notes:

- N/A

Peter Tripp created

3701e19 Add runnable for rust main function (#13087)

Click to expand commit body
Release Notes:

- N/A



https://github.com/zed-industries/zed/assets/21101490/7a57805c-1d31-48b2-bc2c-3a6f0b730d72

Panghu created

5dc26c2 util: Use GlobSet in PathMatcher (#13197)

Click to expand commit body
Previously we were using a single globset::Glob in PathMatcher; higher
up the stack, we were then resorting to using a list of PathMatchers.
globset crate exposes a GlobSet type that's better suited for this use
case. In my benchmarks, using a single PathMatcher with GlobSet instead
of a Vec of PathMatchers with Globs is about 3 times faster with the
default 'file_scan_exclusions' values. This slightly improves our
project load time for projects with large # of files, as showcased in
the following videos of loading a project with 100k source files. This
project is *not* a git repository, so it should measure raw overhead on
our side.

Current nightly: 51404d4ea08cb5ba1cd678b9963037bde31aa7b2


https://github.com/zed-industries/zed/assets/24362066/e0aa9f8c-aae6-4348-8d42-d20bd41fcd76

versus this PR:


https://github.com/zed-industries/zed/assets/24362066/408dcab1-cee2-4c9e-a541-a31d14772dd7



Release Notes:

- Improved performance in large worktrees

Piotr Osiewicz created