Commit log

31aaee9 windows: Don't propagate window char message (#9470)

Click to expand commit body
we were accidentally calling the input handler even when the keydown
event asked it not to be propagated

Release Notes:

- N/A

Ezekiel Warren created

0e83b22 windows: Dispatch missing foreground tasks (#9469)

Click to expand commit body
Some foreground tasks were being missed causing some unresponsiveness in
Zed. The foreground tasks used to happen but it was changed in #9351
(here:
https://github.com/zed-industries/zed/pull/9351/files#diff-5b5e706f04c15d77efd23989ec5b1b1cf73d36144e2d066a074de165533ecaeaL227)

Release Notes:

- N/A

Ezekiel Warren created

3d08e20 Fix dispatching global actions from a window (#9502)

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

Release Notes:

- Fixed a regression that caused global actions to stop working when
invoked from a window (preview-only)
([#9313](https://github.com/zed-industries/zed/issues/9313)).

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

Antonio Scandurra and Conrad created

4e17ce3 windows: credentials implementation (#9385)

Click to expand commit body
Release Notes:

- N/A

Ezekiel Warren created

64ebbb4 Update `display` info when window moved to another monitor (#9360)

Click to expand commit body
Release Notes:

- N/A

张小白 created

c116a7c Clean up `Picker` constructor signature (#9500)

Click to expand commit body
This PR cleans up the (internal) `Picker` constructor signature, mainly
to remove the consecutive boolean parameters.

Release Notes:

- N/A

Marshall Bowers created

98111c3 Update blade-graphics with the better intel+nvidia workaround

Dzmitry Malyshau created

7512c99 Allow `Picker` to be headless (#9099)

Click to expand commit body
At the moment, `Picker` always has an editor at the top, that allows the
user to search list elements by text. Sometimes, the UI doesn't need
such an editor. Like in the [tab
switcher](https://github.com/zed-industries/zed/issues/7653) that will
confirm selection on the modifier keys release, so there will be no
searching capabilities.

This PR adds support for a "headless picker" that doesn't display an
editor. It only has an invisible element to hold input focus for
preventing it from jumping back to the workspace.

At the moment, none of the picker implementations is made headless. It's
for the future implementations. But I'd like to make it a separate PR to
keep it focused on this particular feature.

Release Notes:

- N/A

Related Issues:
- Part of #7653

---------

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

Andrew Lygin and Marshall Bowers created

ad97c35 Add regex syntax highlighting for JS and TS (#7851)

Click to expand commit body
<img width="544" alt="SCR-20240215-pvzy"
src="https://github.com/zed-industries/zed/assets/67913738/e4d463a6-1795-4728-ac24-6c8e03e7ea5b">

Release Notes:

- Added support for regex syntax highlighting in `JS` and `TS`.

Robin Pfäffle created

9f96c43 windows: Don't report 'shift' for certain keys (#9479)

Click to expand commit body
allows keybindings for character such as `:`, `?`, etc. (important for
vim mode!)

alternative solution is here: #9478

Release Notes:

- N/A

Ezekiel Warren created

be4e19b Update to UI and Framework Icons (#9468)

Click to expand commit body
This is an update to 82 Zed UI and file_icons to improve icon legibility
and align contributed file_icons to the general icon system styling.
From review it appears they're 2px larger in width and height but gpui
render scaling is at play. The original icons were designed at 14x14 to
be viewed at that size, but the ui_font_size now controls this so
they've been updated to the default of 16x16 for optimum fidelity.

![CleanShot 2024-03-17 at 16 20
13@2x](https://github.com/zed-industries/zed/assets/1648941/4151c631-78e6-43a8-914f-37b00f43e130)

Release Notes:

- Updated various UI and file icons for consistency.

Derek Briggs created

5668cca docs: Use plain quotes for callouts (#9499)

Click to expand commit body
This PR adjusts our docs to use plain Markdown quotes for callouts.

This Markdown gets rendered in a number of different locations:

- GitHub
- zed.dev
- mdBook

As such, we should use Markdown that is supported by all three.

Release Notes:

- N/A

Marshall Bowers created

c2d5b33 windows: Fix Clippy warnings (#9426)

Click to expand commit body
Just handling clippy warnings

Release Notes:

- N/A

白山風露 created

ee50d22 windows: Add manifest for storybook (#9453)

Click to expand commit body
allows `cargo run -p storybook` to work on Windows

Release Notes:

- N/A

Ezekiel Warren created

f60774b chore: Wrap WorkspaceId in newtype (#9492)

Click to expand commit body
Release Notes:

- N/A

Piotr Osiewicz created

07dbee8 task: Add ZED_PACKAGE task variable in Rust files. (#9491)

Click to expand commit body
This variable is experimental, as I expect it to be superseded by
whatever the extensions can provide (once we get them)

Release Notes:

- Added experimental ZED_PACKAGE task variable which contains name of
the current crate in Rust files.

---------

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

Piotr Osiewicz and Kirill created

a69eddc Limit project search to avoid unresponsive app (#9404)

Click to expand commit body
This fixes #[#9135](https://github.com/zed-industries/zed/issues/9135)
by introducing file/results limit to project search.

It does this by changing how project search works in multiple ways.

User-facing changes:

- Number files that are being searched is now limited to 5000
- Number of search results in all files is now limited to 10000
- If a limit is reached, search is stopped and a message is displayed
  to the user

Under the hood, we also reworked `Project::search_local`:

- Code has been refactored so that the concurrency-logic is easier to
  distinguish from the search logic.
- We now limit the number of concurrent `open_buffer` operations, since
  that is being done on the main thread and can lead to beachballs when
  finding a lot of results.

Note for reviewer:

@SomeoneToIgnore since you know this code, can you take a look at this?
The changes might look bigger than they are in certain places because I
only extracted code into functions, but the middle part — the sorting of
file paths — has changed in order to avoid too many tasks opening
buffers at the same time and making app unresponsive.

What's also curious is that I think there was a bug in that we searched
ignored entries _twice_: once in `search_snapshots` and then later in
the dedicated `search_ignored_entry` function. I changed the `entries()`
call in `search_snapshots` so that it's always `false`, but that caused
tests to fail (see `test_search_in_gitignored_dirs`). @bennetbo and I
think that there's some state in the Project that made the tests pass
before, because the last of the 3 assertions in that test only passes
when the other two queries run. So we changed the test to be more
stateless and included the possible fix in `search_snapshots`.

Release Notes:

- Fixed project-wide search leading to unresponsive application when
searching in ignored files, by limiting the number of files that are
searched (to 5000) and the number of overall search results to 10000.
Additional performance improvements have also been made in order to
offload more work onto a background thread.
([#9135](https://github.com/zed-industries/zed/issues/9135)).

---------

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>

Thorsten Ball , Antonio Scandurra , and Bennet created

52a9bc3 Automatically create a hitbox for focusable elements (#9485)

Click to expand commit body
Closes #9462

This fixes the focus story in the storybook.

Release Notes:

- N/A

Antonio Scandurra created

de14e33 chore: Fix build with latest nightly. (#9467)

Click to expand commit body
Related: #7770



Release Notes:

- N/A

Piotr Osiewicz created

99d4f8c Linux: remove duplicate key bind to "ctrl-shift-p" preventing the command palette from showing up (#9455)

Click to expand commit body
Linux: remove duplicate key bind to "ctrl-shift-p" preventing the
command palette from showing up

Release Notes:
- N/A

Vitor Ramos created

9df92c3 Correctly handle network issues during LSP server installation (#9460)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/9458

When flying in a plane being totally offline, I've discovered that my
Rust projects do not have any LSP support and rust-analyzer disappeared
out of `~/Library/Application Support/Zed/languages/rust-analyzer/`
directory.

Looking at the
[bad.log](https://github.com/zed-industries/zed/files/14627508/bad.log),
it appears that `get_language_server_command` tries to find a newer LSP
server version and fails on
https://github.com/zed-industries/zed/blob/80bc6c8cc800e23ba79723b0c46b731a62203224/crates/language/src/language.rs#L339

bailing out of all installation related-methods up to here:


https://github.com/zed-industries/zed/blob/80bc6c8cc800e23ba79723b0c46b731a62203224/crates/project/src/project.rs#L2916

where the code thinks that the binary installation process had failed,
cleans the existing directory and tries to install the language server
again:

```log
[2024-03-17T15:14:13+02:00 WARN  isahc::handler] request completed with error: failed to resolve host name
[2024-03-17T15:14:13+02:00 ERROR project] failed to start language server "rust-analyzer": error fetching latest release
[2024-03-17T15:14:13+02:00 ERROR project] server stderr: Some("")
[2024-03-17T15:14:13+02:00 INFO  project] retrying installation of language server "rust-analyzer" in 1s
[2024-03-17T15:14:13+02:00 ERROR util] crates/lsp/src/lsp.rs:720: oneshot canceled
[2024-03-17T15:14:14+02:00 INFO  project] About to spawn test binary
[2024-03-17T15:14:14+02:00 WARN  project] test binary failed to launch
[2024-03-17T15:14:14+02:00 WARN  project] test binary check failed
[2024-03-17T15:14:14+02:00 INFO  project] beginning to reinstall server
[2024-03-17T15:14:14+02:00 INFO  language::language_registry] deleting server container
[2024-03-17T15:14:14+02:00 INFO  language::language_registry] starting language server "rust-analyzer", path: "/Users/someonetoignore/work/other/local_test", id: 2
[2024-03-17T15:14:14+02:00 INFO  language] fetching latest version of language server "rust-analyzer"
[2024-03-17T15:14:14+02:00 WARN  isahc::handler] request completed with error: failed to resolve host name
[2024-03-17T15:14:14+02:00 ERROR project] failed to start language server "rust-analyzer": error fetching latest release
[2024-03-17T15:14:14+02:00 ERROR project] server stderr: Some("")
[2024-03-17T15:14:14+02:00 INFO  project] retrying installation of language server "rust-analyzer" in 1s
[2024-03-17T15:14:15+02:00 ERROR util] crates/languages/src/rust.rs:335: no cached binary
[2024-03-17T15:14:15+02:00 INFO  project] About to spawn test binary
............
```

The PR extracts away all binary fetching-related code into a single
method that does not fail the entire `get_language_server_command` and
allows it to recover and reuse the existing binary:


[good.log](https://github.com/zed-industries/zed/files/14627507/good.log)

```log
[2024-03-17T15:12:24+02:00 INFO  language::language_registry] starting language server "rust-analyzer", path: "/Users/someonetoignore/work/other/local_test", id: 1
[2024-03-17T15:12:24+02:00 INFO  language] fetching latest version of language server "rust-analyzer"
[2024-03-17T15:12:24+02:00 WARN  isahc::handler] request completed with error: failed to resolve host name
[2024-03-17T15:12:24+02:00 INFO  language] failed to fetch newest version of language server LanguageServerName("rust-analyzer"). falling back to using "/Users/someonetoignore/Library/Application Support/Zed/languages/rust-analyzer/rust-analyzer-2024-03-11"
[2024-03-17T15:12:24+02:00 INFO  lsp] starting language server. binary path: "/Users/someonetoignore/Library/Application Support/Zed/languages/rust-analyzer/rust-analyzer-2024-03-11", working directory: "/Users/someonetoignore/work/other/local_test", args: []
```

Release Notes:

- Fixed language servers erased from the disk when project is opened
offline

Kirill Bulatov created

80bc6c8 Small cleanup of gpui manifest file (#9439)

Click to expand commit body
Currently, gpui depends on env_logger as both a normal dependency and a
dev-dependency without
using the workspace defined version. This fixes it.

Tobias Decking created

f1d98dc Fix segfault in "install:cli" when app is not yet installed (#9427)

Click to expand commit body
Release Notes:

- Fixed a panic running `cli: Install` or `cli: Register Zed Scheme`
before installing the app.

Conrad Irwin created

c2b42e2 Windows: direct load DCompositionWaitForCompositorClock and fallback (#9351)

Click to expand commit body
…timer

Fix: #9166

Release Notes:

- N/A

白山風露 created

ca6e588 collab logging (#9420)

Click to expand commit body
- **Log errors inside the connection span**
- **Tidy up collab logging**


Release Notes:

- N/A

Conrad Irwin created

0329b4a Allow loading "Segoe Fluent Icons" font on macOS (#9421)

Click to expand commit body
This PR updates the `TextSystem` on macOS to allow loading the "Segoe
Fluent Icons" font.

We're using this font in the Storybook to render the `TitleBar` as it
would appear on Windows despite us running it on macOS. This is to make
things easier for iterating on UI design without needing to test on each
individual platform.

However, the "Segoe Fluent Icons" font does not have a glyph for the `m`
character, causing it to run afoul of a precautionary check added in
#4029, which ultimately results in the font not being loaded (and thus
rendering as a missing glyph).

We work around this by simply ignoring this check if the font we're
trying to load is specifically "Segoe Fluent Icons".

I think longer-term we'll need to revisit the behavior in the editor
that is causing the panics when the `m` glyph is missing from the font,
but that's a problem for a different day.

#### Before

<img width="1283" alt="Screenshot 2024-03-15 at 3 34 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/c0ddd46d-8599-4729-ac98-75522b33e25b">

#### After

<img width="1113" alt="Screenshot 2024-03-15 at 5 12 36 PM"
src="https://github.com/zed-industries/zed/assets/1486634/183c2b43-5e4f-4516-8856-7a2d45ed8b2e">

Note that you currently need to install the "Segoe Fluent Icons" font
yourself—either installing it globally or placing the `.ttf` file in the
`assets/fonts` directory—in order to see the icons rendered. I'd like to
look into getting this, but there are restrictions on the distribution
of the font on non-Windows platforms that will need to be followed.

Release Notes:

- N/A

Marshall Bowers created

41071b0 Always remember the last window size and position (#9416)

Click to expand commit body
make new runs of zed always match the window of the previous run of Zed,
even if it's not the same workspace

fixes https://github.com/zed-industries/zed/issues/5258

Release Notes:

- Zed will always open new windows with the same position and location
as the previous instance of Zed.

Mikayla Maki created

eecbafb Add JSDoc syntax highlighting support (#7826)

Click to expand commit body
![SCR-20240215-mokn](https://github.com/zed-industries/zed/assets/67913738/17750eb5-bf48-4e23-adc5-0f7a5e15a41b)

Closes #4926

Release Notes:

- Added support for [JSDoc](https://jsdoc.app) syntax highlighting
([#7224](https://github.com/zed-industries/zed/issues/7224)).

Robin Pfäffle created

24e7cfb Fix `hex_to_hsla` inside the color crate (#9412)

Click to expand commit body
Previously, when `hex_to_hsla` was called with a color string using the
#rgb format, the expansion
did not add alpha values, leading to an incorrect result. This patch
fixes the issue.

In addition to that, parsing has been reworked, and the new function no
longer makes
calls to the global allocator in addition to generation much smaller
code. Parsing should
therefore be a bit more performant.

Tobias Decking created

c1f1c5e ui: Refine `TitleBar` component (#9415)

Click to expand commit body
This PR continues the refinements to the `TitleBar` component.

Here are the notable changes:

- `KeyBindingDisplay` and `PlatformStyle` have been unified into a
single `PlatformStyle`.
- This provides us a consistent way for adapting UI to different
platform styles.
- `PlatformTitlebar` has been renamed to `TitleBar`.
  - The `Platform` prefix was irrelevant.
- The Windows window controls have been factored out into a separate
module and have been componentized.

<img width="1283" alt="Screenshot 2024-03-15 at 3 34 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/07da391f-828b-48bf-8849-58863f4ccce7">

> I'm missing the Segoe Fluent Icons font, so that's why the aren't
rendering properly.

Release Notes:

- N/A

Marshall Bowers created

dd33330 Finish migration to role instead of `is_admin` (#9414)

Click to expand commit body
Release Notes:

- Fixed a bug signing in for five users
([#4323](https://github.com/zed-industries/zed/issues/4323)).

Conrad Irwin created

123d3ee ui: Clean up `PlatformTitlebar` implementation (#9413)

Click to expand commit body
This PR cleans up the implementation of the `PlatformTitlebar` component
to better match our conventions for building UI components.

Release Notes:

- N/A

Marshall Bowers created

db43479 windows: active window implementation (#9314)

Click to expand commit body
active window implementation - bonus vim mode works on windows now

Release Notes:

- N/A

Ezekiel Warren created

328aa2c Cross-platform titlebar (#9405)

Click to expand commit body
This PR reverts https://github.com/zed-industries/zed/pull/9392 and
fixes the regressions that led to the reversion.

Release Notes:

- N/A

---------

Co-authored-by: Ezekiel Warren <ezekiel@seaube.com>

Mikayla Maki and Ezekiel Warren created

44ac6ca ci: fix-up upload path in upload-nightly for aarch64 (#9409)

Click to expand commit body
mea culpa

Release Notes:

- N/A

Piotr Osiewicz created

487ae73 Fix sharp corners on images (#9408)

Click to expand commit body
Release Notes:

- N/A

Mikayla Maki created

b38e3f1 gpui: img element object-fit (#9393)

Click to expand commit body
Release Notes:

- Added [object-fit
API](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) to the
`img` element. This allows the user to decide how the image is scaled
within the element bounds.
- Fixes corner radius not working as expected on overflowing elements.

Matthias Grandl created

55f4c8e Encapsulate `CommandPaletteFilter` and `CommandPaletteInterceptor` (#9402)

Click to expand commit body
This PR refactors the `CommandPaletteFilter` and
`CommandPaletteInterceptor` to better encapsulate their internals.

Previously these globals and their fields were publicly accessible,
which meant that there was a lot of reaching in and making
modifications.

These changes should make it easier to add additional consumers of these
hooks (right now they're primarily used by Vim mode).

Release Notes:

- N/A

Marshall Bowers created

d311a4b [WIP] chore: Distribute non-universal binaries on Mac (#9284)

Click to expand commit body
Related: #6837, #8671 
Release Notes:

- Zed now ships as a non-universal binary, reducing binary size by ~50%.

Piotr Osiewicz created

dcdd1ec Small improvements of the task terminal spawn behavior (#9399)

Click to expand commit body
* Add a `reveal: always|never` field in task definitions from tasks.json
, allowing to customize task terminal behavior on spawn
* Ensure reveal: always reveals the terminal even if the old task is
already running


Release Notes:

- Added a `reveal: always|never` (`always` is a default) field in task
definitions from tasks.json , allowing to customize task terminal
behavior on spawn

---------

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>

Kirill Bulatov and Piotr Osiewicz created

276139f Implement updating for node-based language servers (#9361)

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

This doesn't address `vue` as it has a slightly different install code,
but it should be fairly simple to add - I'll add it in in a follow-up.

This PR will allow all (except `vue`) node-based language servers to
update. It is mostly just throwing in a method into the `NodeRuntime`
trait that is used for checking if a package doesn't exist locally, or
is out of date, by checking the version against what's newest, and
installing. If any parsing of the `package.json` data fails along the
way, it assumes something has gone awry on the users system, logs the
error, and then proceeds with trying to install the package, so that
users don't get stuck on version if their package has some bad data.
Outside of adding this method, it just adds that check in all of the
language server's individual `fetch_server_binary` methods.

Release Notes:

- Added updating for node-based language servers
([#9234](https://github.com/zed-industries/zed/issues/9234)).

Joseph T. Lyons created

cb16003 Fill context menu of Zed macOS dock icon with recent projects (#8952)

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

Release Notes:

- Added recent projects into Zed's macOS dock icon context menu ([8416](https://github.com/zed-industries/zed/issues/8416))

---------

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

Daniel Zhu and Kirill Bulatov created

5bf0c8e Revert "windows: better looking titlebar" and follow-up (#9392)

Click to expand commit body
This reverts #9053 and #9375 because they introduced a regression on
`main` that broke the titlebars on macOS:


![image](https://github.com/zed-industries/zed/assets/1185253/d046003b-5c66-4a42-9385-623f5d58c9a4)

Two things are off:

- Left padding is missing
- Titlebar height is less than it was before, which means the
traffic-light buttons are not centered vertically

What @as-cii and I noticed while looking into this: the `cfg!(macos)`
macros that were used don't work like that. You need to check for
`cfg!(target = "macos")` etc. Means that on macOS we never used the
macOS-specific code because the condition was always false.

Overall height, we're not sure about.

Release Notes:

- N/A

Thorsten Ball created

5ae1451 Fix flickering when interacting with the language server logs (#9390)

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

The flickering was caused by the pane trying to restore focus on a
`FocusHandle` that wasn't being rendered anymore. This commit uses the
new `WeakFocusHandle` to avoid retaining a reference to focus handles
that don't exist anymore.

Release Notes:

- Fixed a bug that caused flickering when interacting with the language
server logs
([#9340](https://github.com/zed-industries/zed/issues/9340)).

Antonio Scandurra created

b9f7a37 Add option to collapse all folders in root (#9372)

Click to expand commit body
Release Notes:

- Added option to root project folder to collapse all subfolders

Jack T created

badcd3f Remove `Copy` trait for enum Operator (#9378)

Click to expand commit body
In this commit, the Copy trait has been removed from Operator. This
change was necessary due to the value of operator may wish to attach a
motion type, which is not compatible with the Copy trait.

All instances where Operator was previously copied have been updated to
use the clone() or cloned() method instead. This includes function
parameters, variable assignments, and closures.

Hans created

ee26091 Improve TS and JSON syntax highlighting (#9302)

Click to expand commit body
Successor to #7767.

Release Notes:

- Improved syntax highlighting for TS/TSX and JSON.

Robin Pfäffle created

27bcb7f Fix#9253 Duplicate menu item for "Emojis & Symbols" (#9377)

Click to expand commit body
Fix #9253

Hans created

de1db8b Rework/redesign message replies (#9049)

Click to expand commit body
Hello! This PR proposes a redesigned replying system in Zeds chat panel,
inspired by chat applications like [Slack](https://slack.com) and
[Discord](https://discord.com). Feedback and suggestions are welcome! 😄

### TODOs

- [x] Handle replies to removed messages
- [x] Add replied user's profile picture to reply indicator
- [x] Highlight the message that's been selected for replying

--------

### Current Status


https://github.com/zed-industries/zed/assets/146845123/4ed2c2d7-a586-48bd-973c-0d3f033e2c6b

--------

Release Notes:

- Redesigned message replies in the chat panel

---------

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

Evren Sen and Thorsten Ball created

71aaefc Add `multi_cursor_modifier` setting (#9014)

Click to expand commit body
this PR allows users to use `cmd` instead of `alt` as the
`multi_cursor_modifier` for creating multiple cursors/selections

closes #4339

---------

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

Max and Conrad Irwin created