Commit log

b4be47b zed 0.124.4

Conrad Irwin created

dae95e0 Disable swift for now (#8291)

Click to expand commit body
It causes segfaults on load

Release Notes:

- Fixed a segfault opening a Swift file with the Swift extension
installed.

Conrad Irwin created

4faf3ac zed 0.124.3

Conrad Irwin created

9e9ea6f Allow typing space in workspace::SendKeystrokes (#8288)

Click to expand commit body
Fixes #8222

Release Notes:

- N/A

Conrad Irwin created

e3d5a0f Fix for toggles on the Welcome page (#8159)

Click to expand commit body
Release Notes:

The issue is that when welcome page appears settings.json file is not
created yet. So the idea of this fix is to create the file in case it is
not there yet.

- Fixed the toggles on the welcome screen not working if no settings
file exists yet.
([#8153](https://github.com/zed-industries/zed/issues/8153)).

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>

Uladzislau Kaminski , Thorsten Ball , and Marshall created

bd317ee zed 0.124.2

Conrad Irwin created

77cdc28 Fix a panic in the assistant panel (#8244)

Click to expand commit body
Release Notes:

- Fixed a panic in the assistant panel when the app is shutting down.

Conrad Irwin created

1ba3376 fix vim panics (#8245)

Click to expand commit body
Release Notes:

- vim: Fixed a panic when using H/M/L when scrolled beyond the end of
the buffer

Conrad Irwin created

292d32e Pick up more home dir shell env when spawning (#8273)

Click to expand commit body
Release Notes:

- Improved how Zed picks up shell environment when spawned.

Thorsten Ball created

10df9df Detect and possibly use user-installed `gopls` / `zls` language servers (#8188)

Click to expand commit body
After a lot of back-and-forth, this is a small attempt to implement
solutions (1) and (3) in
https://github.com/zed-industries/zed/issues/7902. The goal is to have a
minimal change that helps users get started with Zed, until we have
extensions ready.

Release Notes:

- Added detection of user-installed `gopls` to Go language server
adapter. If a user has `gopls` in `$PATH` when opening a worktree, it
will be used.
- Added detection of user-installed `zls` to Zig language server
adapter. If a user has `zls` in `$PATH` when opening a worktree, it will
be used.

Example:

I don't have `go` installed globally, but I do have `gopls`:

```
~ $ which go
go not found
~ $ which gopls
/Users/thorstenball/code/go/bin/gopls
```

But I do have `go` in a project's directory:

```
~/tmp/go-testing φ which go
/Users/thorstenball/.local/share/mise/installs/go/1.21.5/go/bin/go
~/tmp/go-testing φ which gopls
/Users/thorstenball/code/go/bin/gopls
```

With current Zed when I run `zed ~/tmp/go-testing`, I'd get the dreaded
error:

![screenshot-2024-02-23-11 14
08@2x](https://github.com/zed-industries/zed/assets/1185253/822ea59b-c63e-4102-a50e-75501cc4e0e3)

But with the changes in this PR, it works:

```
[2024-02-23T11:14:42+01:00 INFO  language::language_registry] starting language server "gopls", path: "/Users/thorstenball/tmp/go-testing", id: 1
[2024-02-23T11:14:42+01:00 INFO  language::language_registry] found user-installed language server for Go. path: "/Users/thorstenball/code/go/bin/gopls", arguments: ["-mode=stdio"]
[2024-02-23T11:14:42+01:00 INFO  lsp] starting language server. binary path: "/Users/thorstenball/code/go/bin/gopls", working directory: "/Users/thorstenball/tmp/go-testing", args: ["-mode=stdio"]
```

---------

Co-authored-by: Antonio <antonio@zed.dev>

Thorsten Ball and Antonio created

57426b9 Ensure default prettier installs correctly when certain FS entries are missing (#8261)

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

* bind default prettier (re)installation decision to
`prettier_server.js` existence
* ensure the `prettier_server.js` file is created last, after all
default prettier packages installed
* ensure that default prettier directory exists before installing the
packages
* reinstall default prettier if the `prettier_server.js` file is
different from what Zed expects

Release Notes:

- Fixed incorrect default prettier installation process

Kirill Bulatov created

e12d617 zed 0.124.1

Kirill Bulatov created

ca1a95e Require prerelease eslint version (#8197)

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

Release Notes:

- Fixed eslint diagnostics not showing up due to old eslint version used

Kirill Bulatov created

bc8e7e0 v0.124.x preview

Joseph T. Lyons created

f895d66 Make language server id more explicit in unhandled message logs (#8131)

Click to expand commit body
Before:
```
[2024-02-21T18:55:55+02:00 INFO  language::language_registry] starting language server "eslint", path: "/Users/someonetoignore/Downloads/eslint-configs-demo", id: 2
[2024-02-21T18:55:56+02:00 INFO  lsp] 2 unhandled notification window/logMessage:
{
  "type": 3,
  "message": "ESLint server running in node v18.15.0"
}
[2024-02-21T18:55:56+02:00 INFO  lsp] 2 unhandled notification eslint/confirmESLintExecution:
{
  "scope": "local",
  "uri": "file:///Users/someonetoignore/Downloads/eslint-configs-demo/index.js",
  "libraryPath": "/Users/someonetoignore/Downloads/eslint-configs-demo/node_modules/eslint/lib/api.js"
}
```

After:
```
[2024-02-21T18:57:31+02:00 INFO  language::language_registry] starting language server "eslint", path: "/Users/someonetoignore/Downloads/eslint-configs-demo", id: 2
[2024-02-21T18:57:32+02:00 INFO  lsp] Language server with id 2 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "ESLint server running in node v18.15.0"
}
[2024-02-21T18:57:32+02:00 INFO  project::prettier_support] Fetching default prettier and plugins: [("prettier-plugin-tailwindcss", "0.5.11"), ("prettier", "3.2.5")]
[2024-02-21T18:57:32+02:00 INFO  lsp] Language server with id 2 sent unhandled notification eslint/confirmESLintExecution:
{
  "scope": "local",
  "uri": "file:///Users/someonetoignore/Downloads/eslint-configs-demo/index.js",
  "libraryPath": "/Users/someonetoignore/Downloads/eslint-configs-demo/node_modules/eslint/lib/api.js"
}
```

We have to pass a name there too, but the problem here is that the
unhandled message callback is created very early, along with the binary,
but the server name is received from the LSP initialize response, which
is a totally separate piece of code.
I plan to refactor that code next, but so far, improve the logs at least
slightly.

Release Notes:

- N/A

Kirill Bulatov created

7bf16f2 Fix a bug when extension loading is failed after it's folder is viewed by MacOS finder (#8111)

Click to expand commit body
Fixes #8096

# Bug description

I was experimenting with adding extensions and almost went crazy trying
to make my demo extension work. It appeared that I was copying files
with Finder that creates hidden `.DS_Store` files which interfered with
Zed's loading logic. It assumes that `languages/` directory contains
only directories and never files and so it crashes when meets
`.DS_Store`. This makes any extension stop working after it has been
viewed via Finder

# Change

Check if path is directory when loading extension languages (so it will
skip .DS_Store files)

Ivan Buryak created

d3745a3 Document new theme options (#7899)

Click to expand commit body
Added documentation for
[#4970](https://github.com/zed-industries/zed/issues/4970), a feature
added in the latest update. Will need to modify `Default Settings` to
reflect the new default theme example.

Release Notes:

- N/A

Kyber created

0c939e5 Add task docs and default keybindings (#8123)

Click to expand commit body
Also group task source modules together

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>

Kirill Bulatov and Piotr Osiewicz created

b9151b9 Runnables: remove version field from the format (#8118)

Click to expand commit body
This changes the format of runnables slightly (the top-level object is
now a sequence, not a map).
The 2nd commit pulls in aliases from .zshrc and co.
Release Notes:

- N/A

Piotr Osiewicz created

2679457 Rename runnables into tasks (#8119)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

45e2c01 Copilot: handle "ok" status message when no user is set (#8116)

Click to expand commit body
In #6954 a user has trouble using copilot. We haven't gotten to the
bottom of the problem, but one problem is that apparently sometimes (I'm
going to find out when) copilot sends an `"OK"` status message without a
username. This is from the user's logs:

2024-02-20T15:28:41-03:00 [ERROR] failed to deserialize response from
language server: missing field `user`. Response from language server:
"{\"status\":\"OK\"}"

The official `copilot.vim` plugin handles this as if the user is not
authenticated (!= authorized):


https://github.com/github/copilot.vim/blob/1a284014d2e0baf367706a94b2a9ee5fd56fd457/autoload/copilot.vim#L574-L579

So that's what I'm doing here too.

Release Notes:

- Fixed wrong handling of Copilot sign-in status in rare cases.

Thorsten Ball created

fd98238 Tiny change: use consistent casing in log message (#8115)

Click to expand commit body
Release Notes:

- N/A

Thorsten Ball created

d5aba27 Log when starting language servers (#8075)

Click to expand commit body
This should help us debug more failures because we can now see what
exactly was started.

Release Notes:

- N/A

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

Thorsten Ball , Nathan , and Max created

92b2e56 Fix crash when closing last zed window (#8102)

Click to expand commit body
Fixes: #8100

Release Notes:

- N/A

Joseph T. Lyons created

c58d72e Improve automatic indentation in Gleam code files (#8098)

Click to expand commit body
Release Notes:

- Improved automatic indentation in Gleam code files
([#7295](https://github.com/zed-industries/zed/issues/7295)).

Joseph T. Lyons created

58a5a1e Automatically indent the cursor when adding a newline after a `{` in Gleam code files (#8097)

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

Release Notes:

- Fixed a bug where adding a newline after a `{` would not automatically
indent the cursor in Gleam code files
([#7295](https://github.com/zed-industries/zed/issues/7295)).

Joseph T. Lyons created

cd640a8 Improve key handling on x11, sharing wayland implementation (#8094)

Click to expand commit body
Makes keyboard shortcuts work on x11.

Release Notes:

- N/A

gmorenz created

c97ecc7 Add initial CI job for Windows target (#8088)

Click to expand commit body
Clippy is disabled for now, due to many warnings in both `gpui` and
other code, see
https://github.com/zed-industries/zed/actions/runs/7980269779/job/21789529800
for more details.

Also, due to `#!/usr/bin/env bash` shebang in the `script/clippy`, it
starts in Windows CI with `shell: C:\Program Files\Git\bin\bash.EXE
-euxo pipefail {0}`

https://github.com/zed-industries/zed/actions/runs/7980269779/job/21789529800#step:4:3
It seems more appropriate to use PowerShell instead.

See `todo!("windows")` for all stubbed places currently.

Release Notes:

- N/A

Kirill Bulatov created

48f0f38 Update docs for building Zed (#8092)

Click to expand commit body
This PR updates the docs for building Zed to fix the links in the
sidebar after the addition of the Linux-specific docs in #8083.

Release Notes:

- N/A

Marshall Bowers created

2ec910f Runnables: Add oneshot runnables (#8061)

Click to expand commit body
/cc @SomeoneToIgnore 
Fixes #7460 and partially addresses #7108 
Release Notes:

- N/A

Piotr Osiewicz created

8a73bc4 Vim: enable sending multiple keystrokes from custom keybinding (#7965)

Click to expand commit body
Release Notes:

- Added `workspace::SendKeystrokes` to enable mapping from one key to a
sequence of others
([#7033](https://github.com/zed-industries/zed/issues/7033)).

Improves #7033. Big thank you to @ConradIrwin who did most of the heavy
lifting on this one.

This PR allows the user to send multiple keystrokes via custom
keybinding. For example, the following keybinding would go down four
lines and then right four characters.

```json
[
  {
    "context": "Editor && VimControl && !VimWaiting && !menu",
    "bindings": {
      "g z": [
        "workspace::SendKeystrokes",
        "j j j j l l l l"
      ],
    }
  }
]
```

---------

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

N and Conrad Irwin created

8f5d7db First pass at making a linux keymap (#8082)

Click to expand commit body
Undoubtedly not perfect, but this should be something we can work off
of.

Note that matching keybindings with ctrl in them is currently broken on
linux (or at least x11). This keymap might just manage to be less useful
than using the macos one on linux until that is fixed... the proximate
cause of this is that the `key` field of the `Keystroke` struct looks
like `"\u{e}"` instead of `"n"` when `ctrl-n` is pressed.

Release Notes:

- N/A

gmorenz created

389d26d Linux(Wayland): translate enter and pageup/down from keysym (#8089)

Click to expand commit body
enter and pagedown/pageup weren't working now they do
Release Notes:
- N/A

Gabriel Dinner-David created

e580e2f Update `Cargo.lock` (#8085)

Click to expand commit body
This PR updates `Cargo.lock`, since it was missed in #8059.

Release Notes:

- N/A

Marshall Bowers created

3d9503a Fix cx.windows() to return borrowed windows (#8086)

Click to expand commit body
Fixes #8068

Release Notes:

- Fixed an error message when joining a project twice
([#8068](https://github.com/zed-industries/zed/issues/8068)).

Conrad Irwin created

5c7cec9 Add linux to readme (#8083)

Click to expand commit body
Release Notes:

- N/A

Mikayla Maki created

b028231 linux/x11: disable Vulkan validation in Debug (#8044)

Click to expand commit body
Turns out this validation requirement is confusing new users.

Release Notes:
- N/A

Dzmitry Malyshau created

f7d2cb1 Project search bar layout improvements (#7963)

Click to expand commit body
The PR matches project search layout with the recent changes in the
buffer project layout.

https://github.com/zed-industries/zed/assets/2101250/91b905ea-aed8-4740-9e60-67f3052885e2


Release Notes:

- Improve project search bar layout, match it with the buffer search bar ([7722](https://github.com/zed-industries/zed/issues/7722))

Andrew Lygin created

78dcd72 Fix display of links in lists (markdown_preview) (#8073)

Click to expand commit body
![markdown_preview](https://github.com/zed-industries/zed/assets/67913738/d8e4800f-d549-42e7-90b4-001d98aa39d2)

Release Notes:

- Fixed display of long links in lists not fully visible in markdown
preview.

Robin Pfäffle created

d51a0b6 linux/x11: send XCB requests asynchronously (#8045)

Click to expand commit body
With `send_and_check_request` we'd be blocking both the main loop and
the caller. `send_request` is only going to be blocking on the main loop
when processing the request.

Release Notes:
- N/A

Based on a flamegraph from `perf`/`hotspot`, we are spending 40% of time
redrawing, another 40% of time downloading stuff (i.e. rust toolchain),
and the rest on text rendering, layout and such. This is with Vulkan
Validation (see https://github.com/zed-industries/zed/pull/8044).

I'm also wondering if it would be better with #7758, but regardless we
should have no problem rendering at 60-120 fps and processing user
input. More follow-ups are expected here.

Dzmitry Malyshau created

8178d34 Change default Markdown tab size (#8080)

Click to expand commit body
Following up to #8079, this PR changes the default Markdown tab size to
2 spaces.

This should produce less surprising formatting for lists when using
Prettier.

Release Notes:

- Changed default Markdown tab size to 2 spaces.

Marshall Bowers created

33ecb42 Adjust tab size for Markdown (#8079)

Click to expand commit body
This PR sets the `tab_size` for Markdown to 2 spaces.

This should prevent Prettier from adding a bunch of leading whitespace
when formatting Markdown lists.

Release Notes:

- N/A

Marshall Bowers created

91b9738 bump tree-sitter-nu to latest (#8059)

Click to expand commit body
This PR bumps the tree-sitter-nu commit to the latest supported by the
nushell team. It also includes the latest highlights.scm

Release Notes:

Bumped `nu` tree sitter dependency and highlights.scm

Darren Schroeder created

0a40a21 Timeout while waiting for server to shutdown and kill it

Julia created

b14d576 Follower simplification (#8026)

Click to expand commit body
Release Notes:

- Improved reliability of following

Conrad Irwin created

db0eaca Rename scrollbar_thumb to be consistent with other style properties (#8004)

Click to expand commit body
This small inconsistency was mentioned on the discord. This fixes it.

Release Notes:

- Themes: Renamed `scrollbar_thumb.background` to
`scrollbar.thumb.background` to be consistent with other style
properties.

---------

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

Philipp Schaffrath and Marshall Bowers created

80db468 go: better logging if `go install gopls` fails (#8060)

Click to expand commit body
Release Notes:

- Improved logging if installing `gopls` fails

Thorsten Ball created

0d2ad67 Add settings to configure terminal scroll limit (#8063)

Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/7550
Also set maximum allowed to runnables' terminals.


Release Notes:

- Added settings to configure terminal scroll limit
([7550](https://github.com/zed-industries/zed/issues/7550))

Kirill Bulatov created

7065d6c Use proper template for initial runnables config contents (#8064)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

6c714c1 Fix markdown preview heading overflows no wrap (#8052)

Click to expand commit body
![Kapture 2024-02-20 at 18 27
15](https://github.com/zed-industries/zed/assets/8416130/87d4dcea-e2f0-44ba-88a4-06829dbb0e89)

Release Notes:

- Improved markdown preview wrapping ([#8047](https://github.com/zed-industries/zed/issues/8047)).

Hourann created