Commit log

7cbdea2 Revert "Add support of auto folded directories" (#8476)

Click to expand commit body
Reverts zed-industries/zed#7674

@ABckh: reverting this as it introduced a significant performance
slowdown, most likely caused by iterating through all the snapshot
entries to determine whether a directory is foldable/unfoldable/omitted.
It would be great if you could open a new PR that reverts this revert
and addresses the performance issues. Thank you!

/cc: @maxbrunsfeld 

Release notes:

- N/A

Antonio Scandurra created

ddca6a3 Debounce refresh of inlay hints on buffer edits (#8282)

Click to expand commit body
I think this makes it less chaotic to edit text when the inlay hints are
on.

It's for cases where you're editing to the right side of an inlay hint.
Example:

```rust
for name in names.iter().map(|item| item.len()) {
    println!("{:?}", name);
}
```

We display a `usize` inlay hint right next to `name`.

But as soon as you remove that `.` in `names.iter` your cursor jumps
around because the inlay hint has been removed.

With this change we now have a 700ms debounce before we update the inlay
hints.

VS Code seems to have an even longer debounce, I think somewhere around
~1s.

Release Notes:

- Added debouncing to make it easier to edit text when inlay hints are
enabled and to save rendering of inlay hints when scrolling. Both
debounce durations can be configured with `{"inlay_hints":
{"edit_debounce_ms": 700}}` (default) and `{"inlay_hints":
{"scroll_debounce_ms": 50}}`. Set a value to `0` to turn off the
debouncing.


### Before


https://github.com/zed-industries/zed/assets/1185253/3afbe548-dcfb-45a3-ab9f-cce14c04a148



### After



https://github.com/zed-industries/zed/assets/1185253/7ea90e42-bca6-4f6c-995e-83324669ab43

---------

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

Thorsten Ball and Kirill created

cbdc07d project: enable missing project_core/test-support feature when test-support is enabled (#8471)

Click to expand commit body
This fixes collab's test build failure that @ConradIrwin spotted.


Release Notes:

- N/A

Piotr Osiewicz created

af14bc7 Fall back to stdout if log file is inaccessible (#8415)

Click to expand commit body
https://github.com/zed-industries/zed/assets/31967125/644f3524-e680-457c-bf4c-a7f11f3ec8db

Fixes #8209
Defaults to env logger in case of open/access failure.

Release Notes:

- Improved Zed behavior when no log file access is possible ([8209](https://github.com/zed-industries/zed/issues/8209))

---------

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

Dheeraj and Kirill Bulatov created

8fc2431 vim: Keep multi-cursor on escape (#8464)

Click to expand commit body
Release Notes:

- vim: Preserve multiple selections when returning to normal mode.

/cc @mrnugget

Conrad Irwin created

f3fa3b9 vim: Add HTML tag support for #4503 (#8175)

Click to expand commit body
a simple code for html tag support, I've only done the basics, and if
it's okay, I'll optimize and organize the code, and adapt other parts
like `is_multiline`, `always_expands_both_ways`, `target_visual_mode`,
etc

---------

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

Hans and Conrad Irwin created

a42b987 Add :tabonly and :only vim commands (#8337)

Click to expand commit body
Release Notes:

- Added
[`:tabo[nly][!]`](https://neovim.io/doc/user/tabpage.html#%3Atabonly),
closes all the tabs except the active one but in the current pane only,
every other split pane remains unaffected.
The version with the `!` force closes the tabs while the one without
asks you to save or discard the changes.
- Added [`:on[ly][!]`](https://neovim.io/doc/user/windows.html#%3Aonly),
closes all the tabs *and* panes except the active one.
The version with the `!` force closes the tabs while the one without
asks you to save or discard the changes.
Since Zed does not have different splits per tab like in Neovim `:only`
works the same as it does in VscodeVim.

---------

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

riccardofano and Conrad Irwin created

c316267 channel projects (#8456)

Click to expand commit body
Add plumbing for hosted projects. This will currently show them if they
exist
but provides no UX to create/rename/delete them.

Also changed the `ChannelId` type to not auto-cast to u64; this avoids
type
confusion if you have multiple id types.


Release Notes:

- N/A

Conrad Irwin created

8cf36ae vim: Fix some problems with visual mode testing (#8461)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

079c31f Update `Cargo.lock` (#8458)

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

Release Notes:

- N/A

Marshall Bowers created

bbc4ed9 Add language server for Terraform (#7657)

Click to expand commit body
* Depends on: https://github.com/zed-industries/zed/pull/7449
* Closes: https://github.com/zed-industries/zed/issues/5098

---

This PR adds support for downloading and running the Terraform language
server for `*.tf` and `*.tfvars` files. I've verified that the code
works for `aarch64` and `x86_64` macOS. Downloading new language server
versions on release also works as expected.

Furthermore this PR adds:
- A short docs page for Terraform
- An icon for `*.tf` and `*.tfvars` files

## UX

### File Icons

![CleanShot 2024-02-10 at 23 10
13@2x](https://github.com/zed-industries/zed/assets/45985/6f7cd4f0-e94c-4cfb-b3e9-64b0e33c8a43)

### Completion

![CleanShot 2024-02-13 at 20 54
15@2x](https://github.com/zed-industries/zed/assets/45985/18fafa3b-cb50-4f51-b071-ca9eee3521a6)

### Hover

![CleanShot 2024-02-13 at 20 53
40@2x](https://github.com/zed-industries/zed/assets/45985/4d215315-e019-4d3d-b23c-2691db1803e3)

### Go to definition

![2024-02-13 20 56
28](https://github.com/zed-industries/zed/assets/45985/c21d562f-eb0b-4df9-9175-c53b9923344e)

### Formatting

![2024-02-13 20 59
06](https://github.com/zed-industries/zed/assets/45985/0cdf4ec5-e231-4c8a-a257-cae30a8edc8b)

and more!

## Known issue(s)

@fdionisi discovered that sometimes completion results are inserted with
the wrong indentation. Or rather, if you look closely, they are inserted
with the correct indentation and then something shifts the closing `}`.
I don't think this is related to LSP support and can be addressed in a
separate PR.

![2024-02-13 20 58
16](https://github.com/zed-industries/zed/assets/45985/94a118dd-95f5-4e38-8f83-75fec7a0dddf)

Release Notes:

- Add language server support for Terraform
([#5098](https://github.com/zed-industries/zed/issues/5098)).

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>

Daniel Banck and Max Brunsfeld created

8536ba5 Upgrade Tree-sitter and Wasmtime, compile Cranelift with optimizations in debug builds (#8452)

Click to expand commit body
After upgrading to Wasmtime 18, we got crashes when running Zed in debug
mode. While bisecting the Wasmtime commits and trying to identify the
source of the crash, we noticed this Wasmtime PR, which increased the
stack size of background threads in an example. This alerted us to the
possibility that a stack overflow might be happening due to a lot of
stack usage by cranelift.

https://github.com/bytecodealliance/wasmtime/pull/7651

Release Notes:

- N/A

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

Max Brunsfeld and Marshall created

a0c8deb Mention possible run options in the task modal placeholder (#8449)

Click to expand commit body
Release Notes:

- Improved run task modal's placeholder

---------

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

Kirill Bulatov and Piotr Osiewicz created

009384f Extract project_core out of project (#8438)

Click to expand commit body
That's done to unblock work for dynamic tasks (`task` crate has to
access the worktree yet it is a dependency of a `project`).
Release Notes:

- N/A

Piotr Osiewicz created

72009de chore: Fix warning from 1.77 rustc (#8265)

Click to expand commit body
/cc @maxbrunsfeld , I didn't remove the field outright since I'm not
sure if the intent is to use it eventually in extensions work.
This is the warning we're getting on 1.77 (release date: 03.21.2024) :
```
warning: field `0` is never read
  --> crates/language/src/language_registry.rs:81:12
   |
81 |     Loaded(PathBuf, tree_sitter::Language),
   |     ------ ^^^^^^^
   |     |
   |     field in this variant
   |
   = note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
81 |     Loaded((), tree_sitter::Language),
   |            ~~

warning: field `0` is never read
  --> crates/language/src/language_registry.rs:82:13
   |
82 |     Loading(PathBuf, Vec<oneshot::Sender<Result<tree_sitter::Language>>>),
   |     ------- ^^^^^^^
   |     |
   |     field in this variant
   |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
82 |     Loading((), Vec<oneshot::Sender<Result<tree_sitter::Language>>>),
   |             ~~
```
Release Notes:

- N/A

Piotr Osiewicz created

bdf59b8 fix migration (#8451)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

e01a606 Update 2_crash_report.yml

Joseph T. Lyons created

510f432 Create 2_crash_report.yml

Joseph T. Lyons created

4b7bd03 Update bug report issue template

Joseph T. Lyons created

935938a Format feature request issue template

Joseph T. Lyons created

d4584a1 Tell Wayland compositor we can handle keyboard ver 4 for repeat info (#8446)

Click to expand commit body
Fixes us not getting Wayland key repeat info from the compositor

Release Notes:

- N/A

Julia created

3b2e315 Open a new file on double-clicking the tab bar (#8431)

Click to expand commit body
Fixes #6818

This is a convenience feature that exists in other editors, allowing
quick creation a new tab by double-clicking the empty space on the tab
bar:
![2024-02-26 14 26
16](https://github.com/zed-industries/zed/assets/601206/55d99a84-2e61-494d-b06c-6e5f15071655)

Release Notes:

- Added the ability to open a new buffer when double-clicking on the tab
bar ([#6818](https://github.com/zed-industries/zed/issues/6818)).

Igal Tabachnik created

43163a0 Support rendering strikethrough text in markdown (#8287)

Click to expand commit body
Just noticed strikethrough text handling was not implemented for the
following:

Chat

![image](https://github.com/zed-industries/zed/assets/53836821/ddd98272-d4d4-4a94-bd79-77e967f3ca15)

Markdown Preview

![image](https://github.com/zed-industries/zed/assets/53836821/9087635c-5b89-40e6-8e4d-2785a43ef318)

Code Documentation

![image](https://github.com/zed-industries/zed/assets/53836821/5ed55c60-3e5e-4fc2-86c2-a81fac7de038)

It looks like there are three different markdown parsing/rendering
implementations, might be worth to investigate if any of these can be
combined into a single crate (looks like a lot of work though).

Release Notes:

- Added support for rendering strikethrough text in markdown elements

Bennet Bo Fenner created

cd8ede5 Fix bootstrap script (#8445)

Click to expand commit body
This PR fixes the bootstrap script, as we had some unintentional changes
committed to it.

Closes #8370.

Release Notes:

- N/A

Marshall Bowers created

7d0c515 Improve Ruby grammar to recognize method parameters (#8284)

Click to expand commit body
Release Notes:

- Improved Ruby Grammar to recognise various method parameters

![image](https://github.com/zed-industries/zed/assets/7274458/45d4ee2e-d174-4835-a461-22eee428a73b)


![image](https://github.com/zed-industries/zed/assets/7274458/c1bbf307-4f6b-4839-81dc-9d982c85bc58)

Ben Hamment created

011ae85 Add support of auto folded directories (#7674)

Click to expand commit body
Added support of auto collapsed directories, for example when directory
has only one directory inside we should display it as dir1/dir2 (#6935
). Please feel free to propose better solutions, as I am new in Rust

Demo:
https://streamable.com/seo3n9

Release Notes:

- Added support for auto-collapsing directories.

Yury Abykhodau created

fcd0571 Add file icons for Dart, Swift, Kotlin, Java, Fonts (#8404)

Click to expand commit body
Added icons for
- Dart - https://www.svgrepo.com/svg/473578/dart
- Swift - https://www.svgrepo.com/svg/512939/swift-146
- Kotlin - https://www.svgrepo.com/svg/473692/kotlin
- Java - https://www.svgrepo.com/svg/449119/java-filled
- Fonts - https://www.svgrepo.com/svg/532172/font

Extended support for
- .plist as template

<img width="164" alt="Screenshot 2024-02-26 at 12 17 08 AM"
src="https://github.com/zed-industries/zed/assets/25414681/bd438028-af82-44cd-934f-21ab72ac9d0f">

Release Notes:

- Added icons for Dart, Swift, Kotlin, Java, and font files.
- Changed icon for `.plist` files.

Sai Gokula Krishnan created

f27d598 unique channel names (#8439)

Click to expand commit body
Before this change duplicate channels were ordered arbitrarily, which
put the
collab channel in an inconsistent state.

Release Notes:

- Fixed duplicate channel names appearing in the collab sidebar.

Conrad Irwin created

a44fc24 Clean up many small dependencies (part 3) (#8425)

Click to expand commit body
Follow-up to #8353

Release Notes:
- N/A

Dzmitry Malyshau created

f54bb32 Point requests for languages to extension repository

Joseph T. Lyons created

d8902ca Rename bug report issue template

Joseph T. Lyons created

b575fbb Delete 1_language_support.yml

Joseph T. Lyons created

d8276b0 Hoist `itertools` dependency to workspace level (#8417)

Click to expand commit body
This PR hoists the `itertools` dependency to the workspace level.

Release Notes:

- N/A

Marshall Bowers created

841e010 Hoist `chrono` dependency to workspace level (#8414)

Click to expand commit body
This PR hoists the `chrono` dependency to the workspace level.

Release Notes:

- N/A

Marshall Bowers created

ffdda58 Format JSON files in `assets/` (#8405)

Click to expand commit body
This PR formats the JSON files in the `assets/` directory with Prettier.

This should help avoid some of the changes in formatting when these
files are touched by contributors.

Release Notes:

 - N/A

Marshall Bowers created

6c5dfd1 Add terminal icon for Nu file (#8399)

Click to expand commit body
Nu is a shell language so it should has the `terminal` icon.

Release Notes:

- N/A

<img width="241" alt="Capture d’écran 2024-02-25 à 18 49 43"
src="https://github.com/zed-industries/zed/assets/24520681/0adcd8fd-f5b0-4688-b301-5c49c376c7a0">

Howins created

6ef3237 Add `command_palette_hooks` crate (#8398)

Click to expand commit body
This PR introduces a new `command_palette_hooks` crate that contains the
types used to hook into the behavior of the command palette.

The `CommandPaletteFilter` was previously extracted to the `copilot`
crate in #7095, solely because that was the earliest ancestor of the
crates that depended on it.

The `CommandPaletteInterceptor` was still defined in `command_palette`
itself.

Both of these types were consumed by other crates wanting to influence
the behavior of the command palette, but required taking a dependency on
the entire `command_palette` crate in order to gain access to these
hooks.

By moving them out into their own crate, we can improve the compile
order and make crates like `vim` able to begin building sooner without
having to wait for `command_palette` to finish compiling.

Here's a comparison of the compilation graph before and after (ignore
the timings):

#### Before

<img width="332" alt="Screenshot 2024-02-25 at 12 42 29 PM"
src="https://github.com/zed-industries/zed/assets/1486634/a57c662e-fbc2-41ab-9e30-cca17afa6c73">

#### After

<img width="362" alt="Screenshot 2024-02-25 at 12 51 15 PM"
src="https://github.com/zed-industries/zed/assets/1486634/c1a6d29c-b607-4604-8f1b-e5d318bf8849">

Release Notes:

- N/A

Marshall Bowers created

b299461 Hoist `languages` crate's dependencies to the workspace level (#8394)

Click to expand commit body
This PR hoists all of the dependencies of the `languages` crate to the
workspace level.

Release Notes:

- N/A

Marshall Bowers created

368fec2 Format scripts with Prettier (#8393)

Click to expand commit body
This PR does a one-off format of some of our scripts using Prettier.

Release Notes:

- N/A

Marshall Bowers created

934af6a recent projects: fix list flashing/empty (#8376)

Click to expand commit body
If the list is large (size > overdraw + available height) the
`all_rendered` check was preventing the list from returning an inferred
size. Theoretically we can now report heights which are actually too
small (because not all items were affected during layout), this can be
manually adjusted using the overdraw parameter. In this case its fine
because the picker is inside a max_height which should never be more
then the overdraw we specify (1000 px), and the list will shrink down
either way when the request_measured_layout callback is called again.

Release Notes:

- Fixed flashing of recent projects list when there were a lot of
projects in the list
([#8364](https://github.com/zed-industries/zed/issues/8364#issuecomment-1962849393)).

Bennet Bo Fenner created

053b6cc Rework extension filtering to use a `ToggleButton` (#8387)

Click to expand commit body
This PR reworks the extension filtering to use a `ToggleButton`, since
the filter states are mutually-exclusive.

<img width="1136" alt="Screenshot 2024-02-25 at 10 04 59 AM"
src="https://github.com/zed-industries/zed/assets/1486634/52c621da-201c-42b9-805d-62e3ab66f94b">

Release Notes:

- N/A

Marshall Bowers created

37a12a3 Fix double menu item separator in "Help" section of app menu (#8351)

Click to expand commit body
I've modified the code at `crates/zed/src/app_menus.rs` as it looks like
there was a typo and instead of one
`MenuItem::separator()` there were two.

It would be something like this:

<img width="1512" alt="Captura de pantalla 2024-02-25 a las 16 12 10"
src="https://github.com/zed-industries/zed/assets/93369643/d35d5b57-247c-4a1f-b65a-a1b68cd302b9">

Hugo Urías created

633e31a Allow extensions to be filtered on installed and not installed (#8375)

Click to expand commit body
Partially resolves: https://github.com/zed-industries/zed/issues/7785

Right now, we can engage `Only show installed`, but I've been wanting to
be able to filter down to just uninstalled extensions too, so I can
browse things I don't have. I changed this to have 2 checkboxes,
`Installed` and `Not installed` and both are on by default. You deselect
them to filter down.

<img width="1608" alt="SCR-20240225-etyg"
src="https://github.com/zed-industries/zed/assets/19867440/e2267651-ff86-437b-ba59-89f3d338ea02">

Release Notes:

- Allow extensions list to be filtered down to both installed and not
installed.

Joseph T. Lyons created

882cd6e Revert "Bump tree-sitter, wasmtime (#8306)" (#8373)

Click to expand commit body
This reverts commit d4973846c0f38d8d6dcd4bba9d5d096dec94a073.

Fixes https://github.com/zed-industries/zed/issues/8360 and
https://github.com/zed-industries/zed/issues/8362


Release Notes:

- N/A

Kirill Bulatov created

83f493b Clean up deps for file_finder, language_selector, task, rpc, storybook (#8353)

Click to expand commit body
Following-up on #8330

Invocation
```bash
cargo-machete --with-metadata --skip-target-dir --fix
````

There is more stuff to fix, but it chokes on `async-lock`:
```
cargo-machete found the following unused dependencies in /x/Code/zed:
rpc -- /x/Code/zed/crates/rpc/Cargo.toml:
        async_lock
        prost_build
        serde_derive
Error: Dependency async_lock not found
```

Release Notes:
- N/A

Dzmitry Malyshau created

dbe1f48 ocaml: Small query improvements and fix autoclose brackets (#7769)

Click to expand commit body
Turns out auto-closing words was a bad idea. win**do**w, **struct**ure,
**sig**n and so on

They don't serve any purpose in `config.toml` nor `brackets.scm` at this
point, so I removed them>

Release Notes:
- N/A

rmu created

401798d Remove unused plugin crates (#8350)

Click to expand commit body
This PR removes the unused crates for plugin support.

We're currently exploring Wasm-based extensions, and it's unlikely that
we'll be reusing any of this existing work.

Release Notes:

- N/A

Marshall Bowers created

35bec98 Clean up dependencies of call,lsp,project,settings,vim,welcome, and workspace (#8330)

Click to expand commit body
Based on the product of
[cargo-machete](https://blog.benj.me/2022/04/27/cargo-machete/):

[dependencies.txt](https://github.com/zed-industries/zed/files/14392213/dependencies.txt)

Release Notes:
- N/A

Dzmitry Malyshau created

d497384 Bump tree-sitter, wasmtime (#8306)

Click to expand commit body
Fixes
https://github.com/zed-industries/zed/issues/8296#issuecomment-1961957369

Release Notes:

- Fixed a crash that would happen when loading an extension that added a
grammar that was generated using a very old version of Tree-sitter
([#8296](https://github.com/zed-industries/zed/issues/8296)).

---------

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

Max Brunsfeld , Conrad , and Marshall created

16d826a Show keybindings instead of the action names in the recent project modal

Kirill Bulatov created