Commit log

2c541ae docs: Override `.cargo/config.toml` (#16889)

Click to expand commit body
Still trying to work through issues building the docs.

Trying to see if using a simpler Cargo config (that doesn't use `mold`
flags) helps.

Release Notes:

- N/A

Marshall Bowers created

afe4d8c yaml: Add single quotes to list of brackets (#16859)

Click to expand commit body
Closes #16854

Release Notes:

- Single quotes are now auto-closable in YAML files

Thorsten Ball created

73bde39 docs: Set up mold for `docs_preprocessor` (#16888)

Click to expand commit body
This PR sets up `mold` in the GitHub Action for deploying the docs,
since we need it to build `docs_preprocessor` due to the flags we use on
Linux.

Release Notes:

- N/A

Marshall Bowers created

3b0eb60 Flatten `General` and `Assistant` navigation in docs (#16885)

Click to expand commit body
This PR flattens out the docs nav, so sections like General and
Assistant have a single level of navigation items.

Also renames the `Assistant` page -> `Overview` to be more consistent
with other sections.

| Before | After |
|--------|-------|
| ![CleanShot 2024-08-26 at 11 23
28@2x](https://github.com/user-attachments/assets/06fb9e46-8667-457e-b187-3c2ce2b60369)
| ![CleanShot 2024-08-26 at 11 23
01@2x](https://github.com/user-attachments/assets/1173d75a-53d1-435b-8d1a-c37f28a363d4)
|


Release Notes:

- N/A

Nate Butler created

7a964ff Don't rely on relative path for docs preprocessor (#16883)

Click to expand commit body
Reapplies #16700 with a corrected command. Now it no longer relies on a
relative path.

Thanks @maxdeviant for the quick help 🙏 

Release Notes:

- N/A

Nate Butler created

a87076e Add GH action to delete and block malware comments (#16886)

Click to expand commit body
Adds a GitHub action to detect, delete, and block comments linking to
mediafire malware campaign.

Release Notes:

- N/A

jvmncs created

d67d44f extension: Add more logging when building extensions (#16794)

Click to expand commit body
This helps debug what steps are taken and where
the compiled extension ended up.

Also remove duplicate "compiling Rust extension" / "compiling rust
extension" text - it's confusing.

Release Notes:

- N/A

---------

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

Berkus Decker and Marshall Bowers created

093f131 Add `zed-editor` package and overlay to flake (#16783)

Click to expand commit body
Adds a `zed-editor` package to the flake, along with exported overlay.
Uses [`crane`](https://crane.dev) to avoid issues with updating
git-sourced dependencies' hashes. Crane will also be useful if we want
to export separate packages for `stable`, `preview`, and `nightly` in
the future.

Release Notes:

- Added a default package + overlay to Zed's Nix flake. This is useful
for users wanting to pilot nightly builds of Zed on NixOS.

jvmncs created

7936fe4 ollama: Support model context_size (num_ctx) >2048 (#16877)

Peter Tripp created

2a03dde Revert "Add `docs_preprocessor` crate to support Zed Docs" (#16880)

Click to expand commit body
Temporarily revert #16700 to deal with this error:

`error: manifest path `../crates/docs_preprocessor/Cargo.toml` does not
exist` as it was causing the docs-preprocessor not to run, meaning
unexpanded templates were showing up in the public docs.

Reverts zed-industries/zed#16700

Release Notes:

- N/A

Nate Butler created

c658ad8 elixir: Bump to v0.0.9 (#16879)

Click to expand commit body
This PR bumps the Elixir extension to v0.0.9.

Changes:

- https://github.com/zed-industries/zed/pull/16819

Release Notes:

- N/A

Marshall Bowers created

46bb04a Add `docs_preprocessor` crate to support Zed Docs (#16700)

Click to expand commit body
This PR adds a mdbook preprocessor for supporting Zed's docs.

This initial version adds the following custom commands:

**Keybinding** 

`{#kb prefix::action_name}` (e.g. `{#kb zed::OpenSettings}`)

Outputs a keybinding template like `<kbd
class="keybinding">{macos_keybinding}|{linux_keybinding}</kbd>`. This
template is processed on the client side through `mdbook` to show the
correct keybinding for the user's platform.

**Action** 

`{#action prefix::action_name}` (e.g. `{#action zed::OpenSettings}`)

For now, simply outputs the action name in a readable manner. (e.g.
zed::OpenSettings -> zed: open settings)

In the future we'll add additional modes for this template, like create
a standard way to render `{action} ({keybinding})`.

## Example Usage

```
To open the assistant panel, toggle the right dock by using the {#action workspace::ToggleRightDock} action in the command palette or by using the
{#kb workspace::ToggleRightDock} shortcut.
```

Release Notes:

- N/A

Nate Butler created

5ee4c03 assistant: Normalize line endings for prompts loaded from templates (#16808)

Click to expand commit body
Closes #16804

Similar to #15708, when reading prompts from a template, both Windows
and Linux might end up with `CRLF (\r\n)` line endings, which can result
in a panic.

Release Notes:

- N/A

张小白 created

a28700a theme: Fallback to opaque color for `title_bar.inactive_background` (#16833)

Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/16699, fixes
https://github.com/zed-industries/zed/issues/15112, fixes
https://github.com/zed-industries/zed/issues/14955

| Before | After |
|--------|--------|
|
![image](https://github.com/user-attachments/assets/3c93dc02-3421-4fd8-b34e-c54644202caa)
|
![image](https://github.com/user-attachments/assets/f938d77f-7e9b-4c1f-9beb-38ff77a5fa93)
|

Release Notes:

- Linux: Fixed title bar becoming transparent when the window lost
focus.

apricotbucket28 created

55dda0e A set of small fixes (#16849)

Click to expand commit body
* Linux Clippy lints fixed
* Zed local tasks are now simpler to rerun
* Zed's `release-fast` build profile keeps the debug info so it's
possible to properly debug things without altering the sources

Release Notes:

- N/A

Kirill Bulatov created

1a2a538 Improve Linux terminal keymap and context menu (#16845)

Click to expand commit body
Follow-up https://github.com/zed-industries/zed/pull/16085 that fixes
the search deploy to be actually a part of the terminal-related
bindings.

Part of https://github.com/zed-industries/zed/issues/16839

Also 

* fixes few other bindings to use `shift` and avoid conflicts with the
existing key bindings.
* adds terminal inline assist to the context menu and makes both the
menu and the button to dynamically adjust to `assist.enabled` settings
change

It is still unclear to me, why certain labels for certain bindings are
wrong (it's still showing `ctrl-w` for closing the terminal tab, and
`shift-insert` instead of `ctrl-shift-v` for Paste, while Insert is near
and has a `ctrl-shift-c` binding shown) but at least the keys work now.

Release notes: 
- Improved Linux terminal keymap and context menu

Kirill Bulatov created

28271a9 Display buffer/project search entries in the outline panel (#16589)

Click to expand commit body
Prototypes a way to display new entities in the outline panel, making it
less outline.
The design is not final and might be adjusted, but the workflow seems to
be solid enough to keep and iron it out.

* Now, when any project search buffer is activated (multi buffer mode),
or buffer search is open (singleton buffer mode, but is available for
search usages multi buffer too — in that case buffer search overrides
multi buffer's contents display), outline panel displays all search
matches instead of the outline items.

Outline items are not displayed at all during those cases, unless the
buffer search is closed, or a new buffer gets opened, of an active
buffer search matches zero items.


https://github.com/user-attachments/assets/4a3e4faa-7f75-4522-96bb-3761872c753a


* For the multi buffer mode, search matches are grouped under
directories and files, same as outline items

![Screenshot 2024-08-21 at 14 55
01](https://github.com/user-attachments/assets/6dac75e4-be4e-4338-917b-37a32c285b71)


* For buffer search , search matches are displayed one under another


![image](https://github.com/user-attachments/assets/9efcff85-d4c7-4462-9ef5-f76b08e59f20)


For both cases, the entire match line is taken and rendered, with the
hover tooltip showing the line number.
So far it does not look very bad, but I am certain there are bad cases
with long lines and bad indents where it looks not optimal — this part
most probably will be redesigned after some trial.
Or, maybe, it's ok to leave the current state if the horizontal
scrollbar is added?

Clicking the item navigates to the item's position in the editor.
Search item lines are also possible to filter with the outline panel's
filter input.

* Inline panel is now possible to "pin" to track a currently active
editor, to display outlines/search results for that editor even if
another item is activated afterwards:


![image](https://github.com/user-attachments/assets/75fb78c3-0e5f-47b4-ba3a-485c71d7e342)

This is useful in combination with project search results display: now
it's possible to leave the search results pinned in the outline panel
and jump to every search result and back.

If the item the panel was pinned to gets closed, the panel gets back to
its regular state, showing outlines/search results for a currently
active editor.


Release Notes:

- Added a way to display buffer/project search entries in the outline
panel

Kirill Bulatov created

dd8d52f elixir: Make files required by elixir-ls executable (#16819)

Click to expand commit body
Closes:

- #15802

This PR fixes an issue in the `elixir-ls` language server installation
where some of the required scripts was not being made executable when
installed from GitHub.

Release Notes:

- Fixed elixir-rs files not being executable ([#15802](https://github.com/zed-industries/zed/issues/15802))

Kai created

5e55d55 language: Do not fetch diagnostics when iterating over text without language awareness (#16824)

Click to expand commit body
This PR fixes a regression from
https://github.com/zed-industries/zed/pull/15646 where we've started
fetching diagnostic spans unconditionally (whereas previously that
wasn't done when iterating over raw text).

Closes #16764

Release Notes:

- Fixed performance regression in handling buffers with large quantities
of diagnostics.

Piotr Osiewicz created

14f8d3a gpui: Send correct kill signal on Linux (#16797)

Click to expand commit body
should be kill -0 (zero) instead

Related to #14291 and #14310

Release Notes:

- N/A

Walter de Jong created

29f97e2 docs: update broken link (#16788)

Click to expand commit body
Release Notes:

- N/A

Junseong Park created

340662e collab: Add lifetime spending limit for LLM usage (#16780)

Click to expand commit body
This PR adds a lifetime spending limit on LLM usage.

Exceeding this limit will prevent further use of the Zed LLM provider.

Currently the cap is $1,000.

Release Notes:

- N/A

Marshall Bowers created

77bb60f Add default terminal binding for buffer search on Linux (#16085)

Click to expand commit body
Release Notes:

- N/A

Vitor Ramos created

352c95c Add injections for GraphQL template literals and function calls (#16368)

Click to expand commit body
This PR adds syntax highlighting support for `gql` and `graphql` tagged
literals. It also adds highlighting for `graphql()` and `gql()` function
calls, which are another common way to define queries.

Note: I am using the
[`graphql`](https://github.com/11bit/zed-extension-graphql) extension to
provide syntax highlighting

Before:
<img width="413" alt="image"
src="https://github.com/user-attachments/assets/114a98be-9790-4cdf-ba98-553f777ff08a">

After:
<img width="418" alt="image"
src="https://github.com/user-attachments/assets/98fc5dfd-d1a3-45c4-be8e-063cf68b6e6e">

Release Notes:

- Added syntax highlighting for `graphql` tagged template literals and
function calls in javascript, typescript and tsx languages.

Affan Shahid created

938d93a gpui: Add `truncate` and `text_ellipsis` to TextStyle (#14850)

Click to expand commit body
Release Notes:

- N/A

Ref issue #4996

## Demo

```
cargo run -p gpui --example text_wrapper 
```



https://github.com/user-attachments/assets/a7fcebf7-f287-4517-960d-76b12722a2d7

---------

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

Jason Lee and Marshall Bowers created

12dda5f Add `Format Buffer` action to mouse context menu (#16080)

Click to expand commit body
Closes #15891 

Release Notes:

- Added "Format Buffer" action to the right-click menu within a buffer.

---------

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

Ihnat and Marshall Bowers created

783cccf WIP: Improve performance of Wrap Map (#16761)

Click to expand commit body
We've ran into performance issues when reinserting new blocks into the
assistant panel; in profiles WrapMap showed up, as we try to query wrap
boundaries over and over, which is a hidden O(n^2) - for each block, we
may potentially look at all of the Wraps. This PR alleviates this issue
by storing away previously resolved wrap range; consecutive iterations
can often reuse it.
This should help with performance of Assistant Panel with long
conversations.

Release Notes:

- Improved performance of assistant panel with large # of text.

Piotr Osiewicz created

30a677e theme: Change autocomplete value for `*_font_fallbacks` (#16759)

Click to expand commit body
This PR follows up #16466, changes the default value used when
autocompleting the `ui_font_fallbacks` and `ui_font_fallbacks` settings
from `null` to `[]`.

Special thanks to @maxdeviant for the guidance on writing better code!


Release Notes:

- N/A

张小白 created

a2dee8c Add some permalinks to linux packaging docs (#16756)

Click to expand commit body
Release Notes:

- N/A

jvmncs created

935cf54 Fix impersonation in local development (#16755)

Click to expand commit body
This PR fixes impersonation in local development by fetching the user
from the GitHub API so we can get their `github_user_id`.

The `github_user_id` is now required after #16704.

Since this is just a development flow, we're fetching the user on the
client as opposed to making changes on the server.

This request uses the `GITHUB_TOKEN` environment variable for
authentication, if it exists, or will make an unauthenticated GitHub API
request.

Release Notes:

- N/A

Marshall Bowers created

5e869da Fix ctrl-d/u issues with scroll_beyond_last_line off (#15395)

Click to expand commit body
Closes #15356

Release Notes:

- vim: Fixed issues with `ctrl-d`/`ctrl-u` when
`scroll_beyond_last_line` is set to `off`
([#15356](https://github.com/zed-industries/zed/issues/15356)).


https://github.com/user-attachments/assets/d3166393-4a4e-4195-9db6-3ff1d4aeec78

---------

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

Kevin Sweet and Marshall Bowers created

518dd3e activity indicator: Do not show indicators background when there's no state (#16737)

Click to expand commit body
Found by @SomeoneToIgnore :

![image](https://github.com/user-attachments/assets/3c8fd3f6-3411-4ca9-88b7-56a7d0d407d3)



Release Notes:

- N/A

Piotr Osiewicz created

7647644 zed ai: Show ToS form in Configuration View (#16736)

Click to expand commit body
Related #16618

Release Notes:

- N/A

Thorsten Ball created

119e337 activity indicator: fix popover menu appearing for empty lists (#16734)

Click to expand commit body
Release Notes:

- N/A

---------

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

Piotr Osiewicz and Kirill Bulatov created

82090c6 Able to resolve URLs with query params in terminal (#16724)

Click to expand commit body
<img width="207" alt="image"
src="https://github.com/user-attachments/assets/aa7d8de1-313b-4aae-a6c6-00b442b76fb8">

Release Notes:

- URLs with query parameters are now clickable in the terminal

Liang Kui created

bdf26fe Fix JavaScript and TypeScript HTML injections (#16479)

Click to expand commit body
Fixes #16199

## Description

Recently added template string injections do not completely work for
because any time there is an interpolation (`${// some js content}`)
within an element, its closing tag is not highlighted properly:

![image](https://github.com/user-attachments/assets/e660894b-6e4b-4300-b8d9-2757fa235679)

This PR fixes the issue:

![image](https://github.com/user-attachments/assets/629a30c3-9b3a-4338-aee9-622dbb19581c)

Release Notes:

- Fixed incomplete syntax highlighting for HTML injections inside
JavaScript template tags.

## Note

I'm a beginner with treesitter so I only modified the part for HTML
usecase.
Should the same solution be applied to other injections (`css`, `js`,
etc.)?

Florian Sanders created

79d8b97 Add more PHP keywords (#16720)

Click to expand commit body
Release Notes:

- Improved PHP highlights by adding more language keywords

Fabien Salathe created

0fd5030 Rename is_local to is_local_or_ssh (#16717)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

46ecd7d Fix typo in theme schema (#16711)

Click to expand commit body
Release Notes:

- N/A

狐狸 created

88b03bc Allow file paths ending in a language-specific-extension to be used as the language name for injections (#12368)

Click to expand commit body
This allows us to detect the language from the extension if we use paths
in fenced code blocks.

Release Notes:

- You can now use file paths ending in a language-specific file
extension at the start of markdown code blocks.

Nathan Sobo created

db4ff7d collab: Look up users using `github_user_id` when backfilling (#16708)

Click to expand commit body
This PR updates the user backfiller to look up the GitHub users using
the `github_user_id` instead of `github_login`.

Release Notes:

- N/A

Marshall Bowers created

fb35f15 Fix linked ranges + multi-cursor (#16707)

Click to expand commit body
Closes: #16695

Release Notes:

- Fixed double edits when a multi-cursor is in a linked editing range

Conrad Irwin created

78120cc collab: Upsert users by `github_user_id` instead of `github_login` (#16706)

Click to expand commit body
This PR makes it so users are upserted by their `github_user_id` instead
of by their `github_login`.

The `github_user_id` is a stable identifier that does not change, while
the `github_login` can change.

In practice we were already using
`get_or_create_user_by_github_account`, which already checks for an
existing user with a `github_user_id` first, so this change doesn't
result in a change in behavior.

This change is primarily for correctness in the event that `create_user`
is called directly, as we want to be upserting by the stable identifier.

Release Notes:

- N/A

Marshall Bowers created

4ddf2cb collab: Make `users.github_user_id` required and unique (#16704)

Click to expand commit body
This PR makes the `github_user_id` column on the `users` table required
and replaces the index with a unique index.

I have gone through and ensured that all users have a unique
`github_user_id` in the staging and production databases.

Release Notes:

- N/A

Marshall Bowers created

69e76a3 Refactor `all_font_names` (#15345)

Click to expand commit body
In the current code implementation, it seems that the only difference
between `all_font_names` and `all_font_families` is whether dynamically
loaded font resources are included. Specifically, `all_font_families`
returns the names of all system fonts, while `all_font_names` includes
both the system font names and the dynamically loaded font names. In
other words, `all_font_families` is a strict subset of `all_font_names`.
This is what I observed in my tests on macOS.

<img width="682" alt="截屏2024-07-28 00 49 29"
src="https://github.com/user-attachments/assets/47317c28-0074-49d2-bcfa-052cab13e335">

Related codes:
```rust
let x: HashSet<_> = self.all_font_names().into_iter().collect();
let y: HashSet<_> = self.all_font_families().into_iter().collect();
let only_in_x = x.difference(&y).collect::<Vec<_>>();
let only_in_y = y.difference(&x).collect::<Vec<_>>();
println!("=====================================");
println!("1 -> {:?}", only_in_x);
println!("-------------------------------------");
println!("2 -> {:?}", only_in_y);
```

Release Notes:

- N/A

张小白 created

80c2596 repl: Set up a way to copy output from the REPL (#16649)

Click to expand commit body
Closes #15494

Simple copy button to copy an individual output since selection is a bit
more work.

<img width="790" alt="image"
src="https://github.com/user-attachments/assets/4a7d8b69-70cc-428e-8fe3-b95386d341ee">


Release Notes:

- repl: Copy output from the REPL using a button

---------

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

Kyle Kelley and Mikayla created

26f2369 cpp: Add injection for raw string literals (#13726)

Click to expand commit body
Release Notes:

- N/A

Before: 

![Screenshot_20240701_231801](https://github.com/zed-industries/zed/assets/66138117/d0df7819-09e7-4a3b-949d-78e04ff63b23)

After:

![Screenshot_20240702_162856](https://github.com/zed-industries/zed/assets/66138117/943136e1-3b15-482e-bf45-2571cd212eaf)

---------

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

Fernando Tagawa and Marshall Bowers created

b19356a linux: Ignore benign error when cancelling file picker (#15553)

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

This should be clearer on the `ashpd` side, but `ResponseError` comes
from the portal
[Response](https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Request.html#org-freedesktop-portal-request-response),
which means the request itself didn't fail. Ignoring the `Other` variant
here should be safe.

Release Notes:

- Linux: Fixed benign error being shown when cancelling file picker
([#15485](https://github.com/zed-industries/zed/issues/15485))

apricotbucket28 created

7523a7a wayland: Do not reset clipboard data offer on keyboard leave (#16126)

Click to expand commit body
Closes #14415 
(also removed an unused serial while I was at it)

Release Notes:

- Linux: Fixed cross-window copy/paste not working in some Wayland
configurations.

apricotbucket28 created

abc7120 Recursive tab/pane closing on folder deletion (#15222)

Click to expand commit body
Release Notes:

- Added tab/pane closing for files inside a folder being deleted/trashed

Behavior prior:

[Screencast from 2024-07-25
16-26-47.webm](https://github.com/user-attachments/assets/b090f582-bd7e-411d-91b9-d6709aca7295)

New behavior:

[Screencast from 2024-07-25
16-27-53.webm](https://github.com/user-attachments/assets/b35d4c3a-b0ab-4bd3-bcee-e8b6ad1419c3)

This is primarily a proof of concept PR as I'm sure there are more
elegant ways of achieving this. It's been bothering me for a little
while manually closing file tabs in a folder I deleted, and since this
is standard behavior on almost all IDEs and text editors I figured it
would be a nice small little challenge. If there are any changes y'all
want made I'd be happy to.

Knoqx created