Commit log

d2e83cc lua: Bump to v0.0.3 (#10646)

Click to expand commit body
This PR bumps the Lua extension to v0.0.3.

Changes:

- #10639
- #10642

Release Notes:

- N/A

Marshall Bowers created

f633460 zig: Bump to v0.1.1 (#10645)

Click to expand commit body
This PR bumps the Zig extension to v0.1.1.

Changes:

- #10559
- #10634

Release Notes:

- N/A

Marshall Bowers created

9470a52 lua: Fix broken LuaLS download on x64 (#10642)

Click to expand commit body
The changes in #10437 accidentally switched 'x64' to 'x86_64' which
breaks installs on linux x64, macos x64 and windows x64. This yields the
following error:

```
[2024-04-16T12:58:01-04:00 ERROR project] failed to start language server "lua-language-server": no asset found matching "lua-language-server-3.7.4-darwin-x86_64.tar.gz"
[2024-04-16T12:58:01-04:00 ERROR project] server stderr: Some("")
```

It's trying to download: 
`lua-language-server-3.7.4-darwin-x86_64.tar.gz`
which should be
`lua-language-server-3.7.4-darwin-x64.tar.gz`

See [LuaLS release
page](https://github.com/LuaLS/lua-language-server/releases/tag/3.6.25).

CC: @maxbrunsfeld

lua.rs before ef4c70c:

https://github.com/zed-industries/zed/blob/c6028f665182403a035af193a3f27021f6e57c67/crates/languages/src/lua.rs#L35

lua.rs after:

https://github.com/zed-industries/zed/blob/5d7148bde108bd59ca20f297fcebbcb9b8c27452/extensions/lua/src/lua.rs#L49

Release Notes:

- N/A

Peter Tripp created

fa0302f terraform: Don't cache user-installed `terraform-ls` (#10641)

Click to expand commit body
This PR updates the Terraform extension to not cache the binary when it
is using the one on the $PATH.

Release Notes:

- N/A

Marshall Bowers created

5d7148b lua: Don't cache user-installed `lua-language-server` (#10639)

Click to expand commit body
This PR updates the Lua extension to not cache the binary when it is
using the one on the $PATH.

Release Notes:

- N/A

Marshall Bowers created

58991f3 csharp: Don't cache user-installed `OmniSharp` (#10638)

Click to expand commit body
This PR updates the C# extension to not cache the binary when it is
using the one on the $PATH.

Release Notes:

- N/A

Marshall Bowers created

9c569c8 zig: Rename `cached_binary` to `cached_binary_path` (#10637)

Click to expand commit body
This PR renames the `cached_binary` field on the `ZigExtension` back to
`cached_binary_path` to make it match the other extensions.

Release Notes:

- N/A

Marshall Bowers created

1ba0bf9 clojure: Don't cache user-installed `clojure-lsp` (#10636)

Click to expand commit body
This PR updates the Clojure extension to not cache the binary when it is
using the one on the $PATH.

Release Notes:

- N/A

Marshall Bowers created

53105dd gleam: Don't cache user-installed `gleam` (#10635)

Click to expand commit body
This PR updates the Gleam extension to not cache the binary when it is
using the one on the $PATH.

Release Notes:

- N/A

Marshall Bowers created

210f8eb zig: Do not cache user-installed `zls` (#10634)

Click to expand commit body
This was a bug introduced when moving to extensions: when we find a
binary in the user's project environment, we shouldn't cache that
globally since it might not work for other projects.

See also: https://github.com/zed-industries/zed/pull/10559

Release Notes:


- N/A

Thorsten Ball created

c015b5c Enable inline-git-blame by default (#10632)

Click to expand commit body
Release Notes:

- N/A

Thorsten Ball created

c1c8a74 Add ability to specify binary path/args for clangd (#10608)

Click to expand commit body
This uses the language server settings added in #9293 to allow users to
specify the binary path and arguments with which to start up `clangd`.

Example user settings for `clangd`:

```json
{
  "lsp": {
    "clangd": {
      "binary": {
        "path": "/usr/bin/clangd",
        "arguments": ["--log=verbose"]
      },
    }
  }
}
```

Constraints:

* Right now this only allows ABSOLUTE paths.

Release Notes:

- Added ability to specify `clangd` binary `path` (must be absolute) and
`arguments` in user settings. Example: `{"lsp": {"clangd": {"binary":
{"path": "/usr/bin/clangd", "arguments": ["--log=verbose"] }}}}`

Henrique Ferreiro created

2f00fcb docs: use_autoclose (#10514)

Click to expand commit body
Add some keywords (bracket, quote, etc)to the comments describing
`use_autoclose` preference in the settings json.

This setting took me a while to find -- so now it'll be more easily
searchable for others.

Release Notes:

- N/A

Peter Tripp created

5c5fb97 Handle setting git blame delay to 0 (#10626)

Click to expand commit body
Release Notes:


- N/A

Thorsten Ball created

7928095 chore: parse cli args just once in zed crate (#10613)

Click to expand commit body
Release Notes:

- N/A

Piotr Osiewicz created

70c3ca4 Fix toggling of inline git blame when it's delayed (#10620)

Click to expand commit body
Release Notes:

- N/A

Thorsten Ball created

d49271a Use project search action with the default keybinding in app menus (#10618)

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

Zed has `workspace::NewSearch` (without a default keybinding) and
`workspace::DeploySearch` (with the default keybinding for its
`DeploySearch::find()` form).

Use the one with the keybinding, as it's the whole point of the menu.

Release Notes:

- Fixed "Find In Project" app menu item having no keybinding
([10611](https://github.com/zed-industries/zed/issues/10611))

Kirill Bulatov created

e34c443 lsp: Do not set error/result fields if they're missing. (#10610)

Click to expand commit body
We were previously not conforming to LSP spec, as we were setting
**both** result field and error field on response fields, which could
confuse servers. Excerpt from the spec:
> * The result of a request. This member is REQUIRED on success.
> * This member MUST NOT exist if there was an error invoking the
method.

Fixes #10595

Release Notes:

- N/A

Piotr Osiewicz created

2630230 Show Zoom In/Out shortcuts in the labels (#10604)

Click to expand commit body
Based on https://github.com/zed-industries/zed/discussions/10599 
Does the same as the assistant tab with the Zoom In/Out labels.


![image](https://github.com/zed-industries/zed/assets/2690773/afc59a3e-c3df-4fc8-bcaf-1d45a21aecf7)

Release Notes:

- Adjusted Zoom In/Out for Pane and Terminal Pane to show keybinding
labels

Kirill Bulatov created

7e1a184 Fix Markdown code rendering in tooltips ignoring languages (#10607)

Click to expand commit body
Some code blocks that are returned in tooltips (returned by language
servers, for example) use the language file extension as the language in
the the triple-backtick code blocks.

Example:

    ```rs
    fn rust_code() {}
    ```

    ```cpp
    fn rust_code() {}
    ```

Before this change we only looked up the language with the
`rs`/`cpp`/... being interpreted as the language name. Now we also treat
it as a possible file extension.



Release Notes:

- Fixed Markdown code blocks in tooltips not having correct language
highlighting.

Before:


![image](https://github.com/zed-industries/zed/assets/1185253/1f3870a6-467c-4e5f-9e49-1ff32240d10f)

After:

![screenshot-2024-04-16-12 43
39@2x](https://github.com/zed-industries/zed/assets/1185253/21a45ed5-825a-412d-9dc0-35a444fc64ba)

Co-authored-by: Bennet <bennetbo@gmx.de>

Thorsten Ball and Bennet created

c834ea7 Fix `---` in Markdown docs not rendered correctly (#10606)

Click to expand commit body
This fixes #10511 by turning off the YAML metadata block rendering in
the Markdown parser.

`clangd` uses `---` as dividers, but our parser interpreted it as a YAML
metadata block, even though it didn't contain any valid YAML.

Example Markdown from `clangd`:

    ### instance-method `format`

    ---
    → `void`
    Parameters:
    - `const int &`
    - `const std::tm &`
    - `int & dest`

    ---
    ```cpp
    // In my_formatter_flag
    public: void format(const int &, const std::tm &, int &dest)
    ```

What's between the two `---` is *not* valid YAML. Neovim, too,
interprets these as dividers and renders them as such.

And since we don't handle any possible metadata anyway, we can turn off
the metadata handling, which causes the parser to interpret the `---` as
dividers.



Release Notes:

- Fixed Markdown returned by `clangd` being rendered the wrong way.
([#10511](https://github.com/zed-industries/zed/issues/10511)).

Before:

![screenshot-2024-04-16-12 32
15@2x](https://github.com/zed-industries/zed/assets/1185253/a268f106-9504-48aa-9744-42a7521de807)

After:

![screenshot-2024-04-16-12 33
02@2x](https://github.com/zed-industries/zed/assets/1185253/dd178a63-a075-48a9-85d9-565157a5b050)

Co-authored-by: Bennet <bennetbo@gmx.de>

Thorsten Ball and Bennet created

4d8cba2 Fix long git author names/emails overflowing blame tooltip (#10605)

Click to expand commit body
This fixes https://github.com/zed-industries/zed/issues/10581.

Release Notes:

- N/A

Co-authored-by: Bennet <bennetbo@gmx.de>

Thorsten Ball and Bennet created

08aef19 Fix inline blame annotations handling wrapped lines (#10600)

Click to expand commit body
Fixes inline blame not being displayed correctly for soft-wrapped lines.

(Can't find the ticket)
![screenshot-2024-04-16-10 50
29](https://github.com/zed-industries/zed/assets/1185253/e3ff9018-f796-469a-9d42-5997baf7d2f6)


Release Notes:

- N/A

Thorsten Ball created

2cfb1ff add a setting to control show/hide terminal button for status bar (#10593)

Click to expand commit body
Release Notes:

- Added a setting to show/hide the terminal button in the status bar:
`{"terminal": {"button": false}}` to hide it. (#10513)

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>

Hans and Thorsten Ball created

f3192b6 Fix scrollbar marker settings (#10530)

Click to expand commit body
Zed displays scrollbar markers of three types: git diffs, background
highlights and diagnostics. At the moment, the "background highlights"
markers are displayed for all the supported highlights:

- Occurences of the symbol under cursor.
- Search results.
- Scope boundaries (only works when a symbol is selected).
- Active hover popover position.

They all use the same color, which leads to confusing results. For
instance, in the following case I expect to see markers for the
`new_anchor` occurences in lines 43 and 47. But besides them, there're
also scope-markers for `ScrollAnchor` initialization block in lines 46
and 49, which makes me think that there're four places where
`new_anchor` appears.

<img width="740" alt="zed-scrollbar-markers"
src="https://github.com/zed-industries/zed/assets/2101250/78700e6b-fdd1-4c2f-beff-e564d8defc13">

Existing settings `selection` and `symbol_selection` in the `scrollbar`
section [don't work as
expected](https://github.com/zed-industries/zed/pull/10080#discussion_r1552325493),
which increases confusion.

This PR only leaves two types of bg-highlight-markers and provides
dedicated settings for them:

- Occurences of the symbol under cursor. Setting: `selected_symbol`,
default is `true`.
- Search results. Setting: `search_results`, default is `true`.

The `selection` and `symbol_selection` settings are not used anymore.

Release Notes:

- Breaking changes. Settings `selection` and `symbol_selection` in the
`scrollbar` section renamed to `search_results` and `selected_symbol`
respectively. Fixed the effect of these settings on which markers are
displayed on the scrollbar.

Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.

- N/A

/cc @mrnugget

Andrew Lygin created

33b9aca Add a bump patch version workflow (#10588)

Click to expand commit body
I'd like to make it less clunky to release a new patch version of
preview/stable.

Release Notes:

- N/A

Conrad Irwin created

57b087e On label conflict, prefer resolved tasks with never templates (#10586)

Click to expand commit body
This way, static (and other) templates that change, e.g. env vars, will
get the new template resolved task in the modal to run.

Release Notes:

- N/A

Kirill Bulatov created

2a9ce3c Handle no active editor available (#10503)

Click to expand commit body
Cleaned up a stray `.unwrap()`

Release Notes:

- N/A

Kyle Kelley created

f5c2483 Close the backticks in gpui geometry examples (#10579)

Click to expand commit body
I noticed some of the examples in `crates/gpui/src/geometry.rs` were
missing ending triple backticks.

Release Notes:

- N/A

Kyle Kelley created

4d314b2 Increase the context in other multibuffers (#10582)

Click to expand commit body
This moves the diagnostics and find all references to be in line with
the search pane. This also centralizes the constant into the editor code
base.

Release Notes:

- Increased diagnostic context to match the project search context.

Mikayla Maki created

7a112b2 dart: Use upstream tree-sitter-dart (#10552)

Click to expand commit body
Update `tree-sitter-dart` to the upstream package, there was an issue
building Rust package which is resolved now.


Release Notes:


- N/A

Abdullah Alsigar created

575eb79 Remove stray word in `CONTRIBUTING.md`

Marshall Bowers created

4f776f9 Don't make -l imply -d in bundle-mac script (#10438)

Click to expand commit body
If you want a debug build, you can easily pass `-ld`.

Release Notes:

- N/A

Nathan Sobo created

0c77e1c Disable extension entries when the corresponding dev extension is installed (#10580)

Click to expand commit body
This PR updates the extension list to disable remote entries when the
corresponding dev extension is installed.

Here is what this looks like:

<img width="1189" alt="Screenshot 2024-04-15 at 4 09 45 PM"
src="https://github.com/zed-industries/zed/assets/1486634/48bb61d4-bc85-4ca6-b233-716831dfa7d8">


Release Notes:

- Disabled extension entries when there is a development copy of that
extension installed.

Marshall Bowers created

904b740 More vim-like regexes (#10577)

Click to expand commit body
Fixes:  #10539

Release Notes:

- vim: Use `\<` `\>` instead of `\b`

Conrad Irwin created

f2fc84a Revert change to tracing (#10578)

Click to expand commit body
Although we thought this fixed the bug, it just worked around it, and
runnign two copies of tracing in one app is a bad idea.

Simplify default RUST_LOG in development to avoid
 https://github.com/tokio-rs/tracing/issues/2927#issuecomment-2040080189



Release Notes:

- N/A

Conrad Irwin created

fda3c91 bump libgit2 (#10561)

Click to expand commit body
Although this probably doesn't fix anything by itself, it'll make it
easier to fix https://github.com/libgit2/libgit2/issues/6795

Release Notes:

- N/A

Conrad Irwin created

3eb8464 wayland: Improve cursor (#10516)

Click to expand commit body
Fixes the cursor not updating when (a) switching windows from another
program via a shortcut and (b) when cursor updates were triggered by
something other than moving the mouse (e.g. when scrolling or pressing a
key).

Release Notes:

- N/A

apricotbucket28 created

58f5749 windows: Remove `last_ime_input` (#10506)

Click to expand commit body
It seems that windows always report IME composition string, so there is
no need to store this string manually.

Release Notes:

- N/A

张小白 created

3e44e97 Install the latest compatible version of an extension when clicking "Install" (#10575)

Click to expand commit body
This PR makes it so clicking "Install" will install the latest
compatible version of an extension instead of disabling the button when
the latest version is not compatible.

The "Upgrade" button will still be disabled when the latest version is
not compatible. We will also now display a tooltip to better indicate
why the button is disabled:

<img width="607" alt="Screenshot 2024-04-15 at 2 41 26 PM"
src="https://github.com/zed-industries/zed/assets/1486634/16ad516e-1c0c-4505-b994-158ea655641b">

Related to https://github.com/zed-industries/zed/issues/10509.

Release Notes:

- Changed the "Install" button for extensions to always install the
latest compatible version instead of becoming disabled when the latest
version of an extension is incompatible with the current Zed version.

Marshall Bowers created

fda2123 Indicate which extension version is installed when on an older version (#10574)

Click to expand commit body
This PR adds an indicator to show what extension version is currently
installed when on an extension version that is not the latest.

<img width="1156" alt="Screenshot 2024-04-15 at 2 10 33 PM"
src="https://github.com/zed-industries/zed/assets/1486634/61c5e4cf-a0b8-48fc-8e52-f04f1c351794">

Release Notes:

- Added an indicator to show the currently-installed extension version
when not on the latest version.

Marshall Bowers created

57a736d Fuse iterator supplied to `SumTree::from_iter` (#10571)

Click to expand commit body
This fixes an issue that could cause `from_iter` to never finish if the
underlying iterator restarted after returning `None` for the first time.

We only saw this in development but I wanna cherry-pick it to stable and
preview, just in case.

Release Notes:

- N/A

Co-authored-by: Kyle <kylek@zed.dev>

Antonio Scandurra and Kyle created

015e2ec Remove built-in Nu support in favor of extension (#10570)

Click to expand commit body
Release Notes:

- Removed built-in Nu language support in favor of an extension.

---------

Co-authored-by: Marshall <marshall@zed.dev>

Max Brunsfeld and Marshall created

5037f46 Defer first update active buffer for conversation (#10564)

Click to expand commit body
This fixes when the workspace is not actually available for a
`.read(cx)`.

Release Notes:

- Fix a panic when quoting a selection before the assistant panel has
been started

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

Kyle Kelley and Conrad Irwin created

f28fde5 Move constraints to query parameters for `GET /extensions/:extension_id/download` (#10562)

Click to expand commit body
This PR fixes a bug where the constraints provided when downloading the
latest version of an extension were not being read properly.

These constraints are passed in the query string, but `collab` was
attempting to read them from the path.

This should fix https://github.com/zed-industries/zed/issues/10484, once
it is deployed.


Release Notes:

- N/A

Marshall Bowers created

d1928f0 Remove TODO by defining constant (#10556)

Click to expand commit body
Release Notes:

- N/A

Thorsten Ball created

ad22bdd diagnostics: Update diagnostics more eagerly (#10560)

Click to expand commit body
Here comes a lenghty explanation for a short commit: We've had feedback
that our diagnostics tab often mismatches what's shown in the status
bar. E.g: https://x.com/fasterthanlime/status/1778764747732594753 Let's
dive into the lifetime of diagnostic tab first; it is actually spawned
*just once per workspace*, the first time you click on the diagnostics
status indicator. Even if you close this tab, we still reuse the same
object under the hood later on. This has upsides, as it means that you
can close a tab and then reopen it with your selections still in-tact
and so on. However, this also leads to the perceived staleness.
Crucially, the first time ever in a given session that you spawn the
diagnostics tab, the status bar counts match the content of a tab. That
is because we always call \`update_excerpts\` when we create diagnostics
tab for the first time, but later on we have severe constraints on when
we want to update the excerpts in diagnostics tab, mostly centered
around presence of selections in an editor... but, since we reuse the
diagnostic tab object under the hood, we're always gonna have at least
one selection in an editor sans the first time you open it. The end
result is that in order for diagnostic tab contents to be updated, we
have to get a "on-disk-diagnostics-finished" notification from language
server, which can take a long time.
Another example of this property manifesting itself is that if you fix a
diagnostic warning/error, it takes a while for diagnostic tab to reflect
it.

With this PR, I've afforded a bit of leniency in refreshing the contents
of that tab. The old check that discarded updates when diagnostics
editor had at least one selection has been updated to instead reject
multicursors; this is still overly conservative, as I'm not yet sure how
big of an issue is the cursor that's jumping around (as that's what the
selections constraint is supposed to prevent).



Release Notes:

- Fixed diagnostics tab showing outdated entries before the language
server is done with it's analysis.

Piotr Osiewicz created

da0d968 zig: Use env if using `zls` from shell env (#10559)

Click to expand commit body
This fixes the problem of the Zig extension picking up `zls` from the
shell env but `zls` then failing to launch because it cannot find `zig`.

Scenario in which this happens:
- `.envrc` in a project that sets `$PATH` up
- in that `$PATH` there's `zls` and `zig`
- Zed is started from Dock
- Project is opened
- Shell env from project directory is loaded and used to get to `zls`
- `zls` is then started, without that environment set on the process
- `zls` cannot find `zig`

Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>

Thorsten Ball and Marshall created

200e363 Intersect content mask with hitbox bounds only during hit test (#10554)

Click to expand commit body
This fixes a bug that caused the editor to be rendered incorrectly when
its bounds extended outside the content mask. This is because the editor
uses the returned `Hitbox` bounds to determine the origin of its
elements.

With this commit, we will now store a new `content_mask` field within
the `Hitbox` struct which is captured when the hitbox is inserted. Then,
the content mask is applied on the fly when performing a hit test to
determine whether the hitbox is actually hovered.

Release Notes:

- N/A

Antonio Scandurra created

db48c75 Add basic bash and Python tasks (#10548)

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

* adds "run selection" and "run file" tasks for bash and Python.
* replaces newlines with `\n` symbols in the human-readable task labels
* properly escapes task command arguments when spawning the task in
terminal

Caveats:

* bash tasks will always use user's default shell to spawn the
selections, but they should rather respect the shebang line even if it's
not selected
* Python tasks will always use `python3` to spawn its tasks now, as
there's no proper mechanism in Zed to deal with different Python
executables

Release Notes:

- Added tasks for bash and Python to execute selections and open files
in terminal

Kirill Bulatov created