Commit log

960eaf6 Remove unused TerminalView.has_new_content (#7429)

Click to expand commit body
Found this last week with @osiewicz and we realized that it's unused. So
I think it's fine to remove it, but I want to hear whether @mikayla-maki
has some thoughts here.



Release Notes:

- N/A

Thorsten Ball created

068c141 Fix shell environment not loading for Nushell (#7442)

Click to expand commit body
Turns out that Nushell doesn't like `-lic` and `&&`, but works perfectly
fine with `-l -i -c` and `;`, which the other shells do too.

These all work:

    bash -l -i -c 'echo lol; /usr/bin/env -0'
    nu -l -i -c 'echo lol; /usr/bin/env -0'
    zsh -l -i -c 'echo lol; /usr/bin/env -0'
    fish -l -i -c 'echo lol; /usr/bin/env -0'

Release Notes:

- Fixed shell environment not being loaded if Nushell was set as
`$SHELL`.

Thorsten Ball created

33d982b Add Elm file icon (#7440)

Click to expand commit body
Tried to match the existing file icons in Zed as much as possible. This
is how it looks:

|  dark  | light  | 
|---|----|
| <img width="183" alt="Screenshot 2024-02-06 at 15 03 57"
src="https://github.com/zed-industries/zed/assets/43472/bd862753-41bb-4ca6-9a44-16b9b1c9591c">
| <img width="180" alt="Screenshot 2024-02-06 at 15 03 14"
src="https://github.com/zed-industries/zed/assets/43472/9df8c589-64b6-49f2-8e15-b43126579a9f">
|

The main challenge is that the tangram is visually quite heavy and
detailed. The existing icons in Zed are designed in a 14px bounding box,
but are a bit smaller themselves. I guess the extra space is reserved
for hanging elements, it probably doesn't make sense to occupy the whole
area.

Simply scaling down an available SVG of the tangram didn't work well.
The individual shapes were not recognizable because the spacing between
them was too thin. I tried removing the spacing and applying different
opacities for each shape, but that didn't yield enough contrast between
the shapes either.

The second approach was to just use the outlines. It sort of worked, but
looked a bit messy in the places when the outlines are denser than the
tangram shapes:

|  dark  | light  | 
|---|----|
| <img width="192" alt="Screenshot 2024-02-05 at 22 55 46"
src="https://github.com/zed-industries/zed/assets/43472/d0029f49-675d-40ac-96d8-788a29706bad">
| <img width="195" alt="Screenshot 2024-02-05 at 22 56 05"
src="https://github.com/zed-industries/zed/assets/43472/d2de922a-70ec-4bd1-9033-db9a5201e9bd">
|

I then tried to remove the main outline and use the maximum space for
the tangram. That let me increase the spacing between the shapes. I also
rounded them a little bit, to make them look similar to other icons from
Zed. The end result looks clean and the shapes are still recognisable.

Approaches I tried next to an existing icon from Zed:

<img width="711" alt="Screenshot 2024-02-06 at 15 15 33"
src="https://github.com/zed-industries/zed/assets/43472/a3e4b0db-4b98-4072-91e8-fe71cff19adf">


Release Notes:

- Added file type icon for Elm

Andrey Kuzmin created

56f7f18 Hide the chat message editor when there is no active chat (#7441)

Click to expand commit body
This PR makes it so the chat message editor is hidden when not in an
active chat.

Release Notes:

- Changed the chat message editor to be hidden when not in an active
chat.

Marshall Bowers created

b2ce515 Add Prisma file icon (#7207)

Click to expand commit body
Add Prisma icon from https://github.com/file-icons/icons

![CleanShot 2024-02-06 at 13 17
01@2x](https://github.com/zed-industries/zed/assets/5864275/55ce9286-4e15-4125-b7f7-003e2e8d8bd5)


Release Notes:

- Added Prisma icon.

Guillem Arias Fauste created

dad2df3 Add notes about XCode also being on the Apple Developer website (#7431)

Click to expand commit body
Super minor edit about XCode being on the Apple Developer website, which
can be easier to download and install without needing to go through the
App Store.

Release Notes:
- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>

Josh Taylor and Kirill Bulatov created

1446fb7 Outline a bunch of methods in gpui that leaked SubscriberSet types (#7430)

Click to expand commit body
This takes down LLVM IR size of theme_selector from 316k to ~250k. Note
that I do not care about theme_selector in particular, though it acts as
a benchmark for smaller crates to me ("how much static overhead in
compile time does gpui have").

The title is a bit dramatic, so just to shed some light: by leaking a
type I mean forcing downstream crates to codegen it's methods/know about
it's drop code. Since SubscriberSet is no longer used directly in the
generic (==inlineable) methods, users no longer have to codegen `insert`
and co.

Release Notes:

- N/A

Piotr Osiewicz created

c591681 Fix Terminal focus handlers not being called (#7428)

Click to expand commit body
This fixes #7401 and probably a few other things that seemed odd with
the terminal.

Turns out that `TerminalView` has `focus_in` and `focus_out` callbacks,
but they were never called. The `focus_handle` on which they were set
was not passed in to `TerminalView`.

That meant that the `impl FocusableView for TerminalView` never returned
the focus handle with the right callbacks.

This change here uses the already created focus handle and passes it in,
so that `focus_in` and `focus_out` are now correctly called.

Release Notes:

- Fixed terminal not handling focus-state correctly and, for example,
not restoring cursor blinking state correctly.
([#7401](https://github.com/zed-industries/zed/issues/7401)).

Thorsten Ball created

038d2a8 Respect RUST_LOG when started in terminal (#7425)

Click to expand commit body
Release Notes:

- N/A

Oliver N created

11964dc blade: cull mask support for sprites

Dzmitry Malyshau created

7509677 add a few more libraries to the linux script

Mikayla Maki created

78f32f3 linux: introduce platform callbacks

Dzmitry Malyshau created

7721b55 Refactor cli and gpui dependnecies based on PR review feedback

Dzmitry Malyshau created

c7c4166 Disable extra frames for ProMotion when screen is not active. (#7410)

Click to expand commit body
This was causing an issue where windows about 1/10 of the way across the
display would hang for a fully second after being deactivated.

Release Notes:

- N/A

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

Mikayla Maki , max , nathan , and antonio created

d04a286 Fix prompting the user to hang up when opening a workspace (#7408)

Click to expand commit body
Before this change if you had joined a call with an empty workspace,
then we'd prompt you to hang up when you tried to open a recent project.



Release Notes:

- Fixed an erroneous prompt to "hang up" when opening a new project from
an empty workspace.

Conrad Irwin created

1a40c9f Add Haskell buffer symbol search (#7331)

Click to expand commit body
This PR is a follow-up from
https://github.com/zed-industries/zed/pull/6786#issuecomment-1912912550
and adds an `outline.scm` file for buffer symbol search support in
Haskell.

Release Notes:

- Added buffer symbol search support for Haskell

Pseudomata created

0c34bd8 fix following bugs (#7406)

Click to expand commit body
- Another broken following test
- Fix following between two windows

Release Notes:

- Fixed following when the leader has multiple Zed windows open

Conrad Irwin created

a80a3b8 Add support for specifying both light and dark themes in `settings.json` (#7404)

Click to expand commit body
This PR adds support for configuring both a light and dark theme in
`settings.json`.

In addition to accepting just a theme name, the `theme` field now also
accepts an object in the following form:

```jsonc
{
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "One Dark"
  }
}
```

Both `light` and `dark` are required, and indicate which theme should be
used when the system is in light mode and dark mode, respectively.

The `mode` field is optional and indicates which theme should be used:
- `"system"` - Use the theme that corresponds to the system's
appearance.
- `"light"` - Use the theme indicated by the `light` field.
- `"dark"` - Use the theme indicated by the `dark` field.

Thank you to @Yesterday17 for taking a first stab at this in #6881!

Release Notes:

- Added support for configuring both a light and dark theme and
switching between them based on system preference.

Marshall Bowers created

b59f925 Upgrade GH actions to reduce CI warnings (#7403)

Click to expand commit body
Deals with one of the warnings GH shows on our actions run:

https://github.com/zed-industries/zed/actions/runs/7790218555
<img width="1383" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/e523ec7c-bf43-4b0d-8c36-8540aef6fae9">

bufbuild/* actions seem to have no new major versions so there's nothing
new to upgrade to.

Release Notes:

- N/A

Kirill Bulatov created

46464eb terminal: Fix copy to clipboard lag (#7323)

Click to expand commit body
Fixes #7322

Release Notes:

- Fixed terminal's copy to clipboard being non-instant ([7322](https://github.com/zed-industries/zed/issues/7322))

N8th8n8el created

28a62af Clean up visible inlay hints that got removed from the cache (#7399)

Click to expand commit body
Fixes another flack in the inlay hint cache.
Now that test does not fail after 500 iterations and seems to be stable
at last.

Release Notes:

- N/A

Kirill Bulatov created

6863b92 Add Terraform & HCL syntax highlighting (#6882)

Click to expand commit body
Terraform and HCL are almost the same language, but not quite so
proposing them as separate languages within Zed. (Terraform is an
extension of HCL, with a different formatter.)

This is just adding the language definition, parsing and highlighting
functionality, not any LSP or formatting beyond that for either
language.

I've taken a bunch of inspiration from Neovim for having the separate
languages, and also lifted some of their `scm` files (with attribution
comments in this codebase) as the tree-sitter repo doesn't contain them.
(Neovim's code is Apache-2.0 licensed, so should be fine here with
attribution from reading Zed's licenses files.) I've then amended to
make sure the capture groups are named for things Zed understands. I'd
love someone from Zed to confirm that's okay, or if I should clean-room
implement the `scm` files.

Highlighting in Terraform & HCL with a moderate amount of syntax in a
file (Terraform on left, HCL on right.)

<img width="1392" alt="Screenshot 2024-01-31 at 18 07 45"
src="https://github.com/zed-industries/zed/assets/696/1d3c9a08-588e-4b8f-ad92-98ce1e419659">

Release Notes:

- (|Improved) ...
([#5098](https://github.com/zed-industries/zed/issues/5098)).

Caius Durling created

21797ba file_finder: Simplify removal of file name from file path (#7398)

Click to expand commit body
This PR simplifies the removal of the file name from the file path when
computing the file finder matches.

Release Notes:

- N/A

Marshall Bowers created

ce62404 Correctly use the base element in `HighlightedLabel` (#7397)

Click to expand commit body
This PR updates the `HighlightedLabel` to correctly render its base
element, which is the one that receives the styling properties, instead
of rendering a new `LabelLike`.

Release Notes:

- N/A

Marshall Bowers created

8911e1b Make inlay hints test less flacky (#7396)

Click to expand commit body
Suppresses a flacky inlay hints test failures like
https://github.com/zed-industries/zed/actions/runs/7788741514a for now.

Release Notes:

- N/A

Kirill Bulatov created

2ed45d7 File finder UI enhancement (#7364)

Click to expand commit body
File finder looks and feels a little bulky now. It duplicates file names
and consumes too much space for each file.

This PR makes it more compact:
- File name is trimmed from the path, removing duplication
- Path is placed to the right of the file name, improving space usage
- Path is muted and printed in small size to not distract attention from
the main information (file names)

It makes search results easier to look through, consistent with the
editor tabs, and closer in terms of usage to mature editors.

Release Notes:

- File finder UI enhancement

Andrew Lygin created

91303a5 Do not run scheduled CI jobs on forks (#7394)

Click to expand commit body
Runs scheduled CI jobs only on the main repository, not on forks. These
jobs fail on forks and generate unnecessary noise on contributor emails.



Release Notes:

- N/A

Dairon M created

e2e8e52 Beancount syntax highlighting (#7389)

Click to expand commit body
Release Notes:

- Added syntax highlighting for [Beancount](https://beancount.github.io)

Conrad Irwin created

4195f27 Fix hover links in channel buffers (#7393)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

583ce44 Fix cmd+k in terminal and fix sporadic keybind misses (#7388)

Click to expand commit body
This fixes `cmd+k` in the terminal taking 1s to have an effect. It is
now immediate.

It also fixes #7270 by ensuring that we don't set a bad state when
matching keybindings.

It matches keybindings per context and if it finds a match on a lower
context it doesn't keep pending keystrokes. If it finds two matches on
the same context level, requiring more keystrokes, then it waits.



Release Notes:

- Fixed `cmd-k` in terminal taking 1s to have an effect. Also fixed
sporadic non-matching of keybindings if there are overlapping
keybindings.
([#7270](https://github.com/zed-industries/zed/issues/7270)).

---------

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

Thorsten Ball , Conrad , and Conrad Irwin created

47329f4 Add `search.match_background` colors to bundled themes (#7385)

Click to expand commit body
This PR populates the `search.match_background` colors in the bundled
themes, using the values from the Zed1 themes.

Release Notes:

- Added theme-specific `search.match_background` colors to built-in
themes.

Marshall Bowers created

223f45c Remove default keybinds for navigating between docks/editors (#7381)

Click to expand commit body
Turns out that these keybindings are active in Vim *and* in non-Vim mode
and they shadow `Ctrl-w` in terminals.

We should fix `Ctrl-w` being shadowed, but until then let's remove the
default keybindings.

Release Notes:

- N/A

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

Thorsten Ball , Kirill , and Conrad created

d742b3b Mark the window as dirty when first opening it (#7384)

Click to expand commit body
Otherwise we won't display anything if the window never notifies.

Release Notes:

- N/A

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

Antonio Scandurra and Nathan created

3bf412f Use window's screen rather than window itself to start display link

Click to expand commit body
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Julia , Antonio Scandurra , and Nathan Sobo created

8030e8c Improve the contrast of the default `search_match_background` colors (#7382)

Click to expand commit body
This PR improves the contrast of the default `search_match_background`
colors.

Release Notes:

- Improved the contrast of the default `search.match_background` colors.

Marshall Bowers created

45429a4 Fix inlay hints using stale editor data (#7376)

Click to expand commit body
Refactor the hint query code to pass along an actual `cx` instead of its
potentially stale, cloned version.

Release Notes:

- Fixed occasional duplicate hints inserted and offset-related panics
when concurrently editing the buffer and querying multiple its ranges
for hints

Kirill Bulatov created

0755ce6 picker: Outline Editor::new

Click to expand commit body
That way crates that use Picker::new do not have to codegen constructor of Editor; tl;dr, 10% of LLVM shaved off of crates like vcs_menu or theme_selector in release mode.

Piotr Osiewicz created

87d3f59 Do not show completion documentation if disabled (#7372)

Click to expand commit body
This fixes #7348 by not rendering completions if they are disabled in
the settings. Previously we only checked that setting when starting or
not starting background threads to fetch documentation. But in case we
already have documentation, this stops it from being rendered.

Release Notes:

- Fixed documentation in completions showing up even when disabled via
`show_completion_documentation`
([#7348](https://github.com/zed-industries/zed/issues/7348))

Thorsten Ball created

81bfa5f fix: create the settings and keymaps to unblock file watching

Amin Yahyaabadi created

fde159f build: add Blade font-config sys deps on Linux

Amin Yahyaabadi created

521b2b1 linux: create a hidden window inside the platform

Click to expand commit body
It allows us to receive messages from the dispatcher,
which breaks us out of waiting and lets us execute
main thread runnables as a part of the main loop.

Dzmitry Malyshau created

282cc71 linux: refactor LinuxPlatform to avoid recursive locking from the window callbacks

Dzmitry Malyshau created

8d339ed linux: HACK disable watcher and crash uploader temporarily

Dzmitry Malyshau created

d03f3b9 linux: switch folders to use CONFIG_DIR

Dzmitry Malyshau created

1c410c1 linux: only tick the main thread tasks and one at a time in the event loop

Dzmitry Malyshau created

f92be4b linux: temporarily disable purescript tree sitter

Click to expand commit body
Link error:
  = note: /nix/store/idiaraknw071d20nlqp49s18gbvw4wa0-binutils-2.40/bin/ld: /x/Code/zed/target/x86_64-unknown-linux-gnu/debug/deps/libtree_sitter_haskell-7323f782ad886c6d.rlib(scanner.o): in function `state_new':
          /home/kvark/.cargo/git/checkouts/tree-sitter-haskell-74c278e7a2ef8d7d/cf98de2/src/scanner.c:218: multiple definition of `state_new'; /x/Code/zed/target/x86_64-unknown-linux-gnu/debug/deps/libtree_sitter_purescript-b0a95fb604a5817c.rlib(scanner.o):/home/kvark/.cargo/git/checkouts/tree-sitter-purescript-88dd3ec656c48026/a37140f/src/scanner.c:218: first defined here

Dzmitry Malyshau created

b13b572 linux: disable mac-os specific build commands

Dzmitry Malyshau created

224fe13 blade: fix tile bounds shader FFI

Dzmitry Malyshau created

0a5ebee blade: encapsulate BladeAtlasStorage for indexing

Dzmitry Malyshau created

26ca798 blade: initialize atlas textures

Dzmitry Malyshau created