Commit Graph

931 Commits

Author SHA1 Message Date
Marshall Bowers
ffdda588b4
Format JSON files in assets/ (#8405)
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
2024-02-25 14:11:38 -05:00
Howins
6c5dfd1061
Add terminal icon for Nu file (#8399)
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">
2024-02-25 13:47:04 -05:00
Hugo Urías
cf3b875922
Add icon for R files (#8223)
Add an icon from https://www.svgrepo.com/svg/340612/logo-r-script for .r

<img width="1392" alt="307467014-63f68791-9d74-4bd1-8065-3698665f7c15"
src="https://github.com/zed-industries/zed/assets/93369643/ce24615c-6946-479a-8660-663bf83a7dde">

Credits For Image: @moshyfawn

Release Notes:

- Added R logo
2024-02-24 23:01:39 +02:00
Ngô Quốc Đạt
3ddf2f27d3
Add bun file icon (#8322)
Add bun file icon, source from https://bun.sh/press-kit

![Screenshot 2024-02-24 at 12 32
12](https://github.com/zed-industries/zed/assets/56961917/ebc731a6-5c78-481e-99da-f78f03574fad)

Release Notes:

- Added a bun file icon
2024-02-24 22:40:22 +02:00
Ivan Buryak
58463b2e97
Add icon for GraphQL files (#8213)
Add an icon from https://graphql.org/brand/ for `.graphql`


![Examples@2x](https://github.com/zed-industries/zed/assets/4057095/9751a509-0dca-4611-b98f-277307c4bfe7)
2024-02-23 22:03:02 -05:00
vultix
2e616f8388
Add new argument vim text object (#7791)
This PR adds a new `argument` vim text object, inspired by
[targets.vim](https://github.com/wellle/targets.vim).

As it's the first vim text object to use the syntax tree, it needed to
operate on the `Buffer` level, not the `MultiBuffer` level, then map the
buffer coordinates to `DisplayPoint` as necessary.

This required two main changes:
1. `innermost_enclosing_bracket_ranges` and `enclosing_bracket_ranges`
were moved into `Buffer`. The `MultiBuffer` implementations were updated
to map to/from these.
2. `MultiBuffer::excerpt_containing` was made public, returning a new
`MultiBufferExcerpt` type that contains a reference to the excerpt and
methods for mapping to/from `Buffer` and `MultiBuffer` offsets and
ranges.

Release Notes:
- Added new `argument` vim text object, inspired by
[targets.vim](https://github.com/wellle/targets.vim).
2024-02-23 19:37:13 -07:00
Thorsten Ball
ed3bb68206
Do not display inlay hints as bold (#8283)
I think bold is the least fitting font weight for inlay hints, which
should be subtle hints and not, well, bold.

If someone feels strongly about this, I can revert, but only if we add
the ability to change this per theme.

Until then: beautiful, thin, subtle inlay hints!

Release Notes:

- Improved styling of inlay hints by not making them bold in the editor.


![screenshot-2024-02-23-17 30
29@2x](https://github.com/zed-industries/zed/assets/1185253/89c2a162-76bb-45cd-8b45-2a5bdf8ca87b)
2024-02-23 18:17:13 +01:00
Felipe
a82f4857f4
Add settings to control gutter elements (#7665)
The current gutter was a bit too big for my taste, so I added some
settings to change which visual elements are shown, including being able
to hide the gutter completely.

This should help with the following issues: #4963, #4382, #7422

New settings:
```json5
"gutter": {
    "line_numbers": true, // Whether line numbers are shown
    "buttons": true // Whether the code action/folding buttons are shown
}
```

The existing `git.git_gutter` setting is also taken into account when
calculating the width of the gutter.

We could also separate the display of the code action and folding
buttons into separate settings, let me know if that is desirable.

## Screenshots:

- Everything on (`gutter.line_numbers`, `gutter.buttons`,
`git.git_gutter`):
<img width="434" alt="SCR-20240210-trfb"
src="https://github.com/zed-industries/zed/assets/17355488/bcc55311-6e1d-4c22-8c43-4f364637959b">

- Only line numbers and git gutter (`gutter.line_numbers`,
`git.git_gutter`):
<img width="406" alt="SCR-20240210-trhm"
src="https://github.com/zed-industries/zed/assets/17355488/0a0e074d-64d0-437c-851b-55560d5a6c6b">

- Only git gutter (`git.git_gutter`):
<img width="356" alt="SCR-20240210-trkb"
src="https://github.com/zed-industries/zed/assets/17355488/7ebdb38d-93a5-4e38-b008-beabf355510d">

- Only git gutter and buttons (`git.git_gutter`, `gutter.buttons`):
<img width="356" alt="SCR-20240210-txyo"
src="https://github.com/zed-industries/zed/assets/17355488/e2c92c05-cc30-43bc-9399-09ea5e376e1b">


- Nothing:
<img width="350" alt="SCR-20240210-trne"
src="https://github.com/zed-industries/zed/assets/17355488/e0cd301d-c3e0-4b31-ac69-997515928b5a">



## Release Notes:
- Added settings to control the display of gutter visual elements. `"gutter": {"line_numbers": true,    "code_actions": true,    "folds": true}` ([#8041](https://github.com/zed-industries/zed/issues/8041))  ([#7422](https://github.com/zed-industries/zed/issues/7422))
```

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-22 20:37:13 -07:00
Michael Angerman
ba6b319046
Add an app_menu to Storybook which enables quitting with cmd-q (#8166)
I really think storybook is a cool standalone app but there are some
usability issues that are getting in the way of making this a fun tool
to use.

Currently it is not easy to gracefully exit out of storybook.

In fact even trying to Ctrl-c out of storybook seems currently broken to
me...

So the only real way to exit out of storybook is to kill the process
after a Ctrl-z.

This PR attempts to make this much easier by adding a simple app_menu
with a menu item called quit along with the ability to *Cmd-q* out of
storybook as well...

Both the menu item quit and *Cmd-q* gracefully exit storybook.

There are still a bunch of issues with storybook which I plan on
addressing in future PR's but this is a start and something that to me
is the highest priority to make storybook more functional and easy to
use moving forward.

One of my longer term goals of storybook is to have it be a nice stand
alone application similar to
[Loungy](https://github.com/MatthiasGrandl/Loungy) which can be used as
a nice tutorial application for how to develop a real world *gpui* app.

For that reason I added a *assets/keymaps/storybook.json* file as well.
2024-02-22 12:51:40 -05:00
Mahdy M. Karam
5c4f3c0cea
Add option to either use system clipboard or vim clipboard (#7936)
Release Notes:

- vim: Added a setting to control default clipboard behaviour. `{"vim":
{"use_system_clipboard": "never"}}` disables writing to the clipboard.
`"on_yank"` writes to the system clipboard only on yank, and `"always"`
preserves the current behavior. ([#4390
](https://github.com/zed-industries/zed/issues/4390))

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-22 10:12:29 -07:00
Jason Lee
aff858bd00
Added a cmd-backspace keybinding to delete files in the project panel. (#8163)
Fixes #7228

Release Notes:

- Added a `cmd-backspace` keybinding to delete files in the project panel ([7228](https://github.com/zed-industries/zed/issues/7228))
2024-02-22 12:59:01 +02:00
Kirill Bulatov
0c939e5dfc
Add task docs and default keybindings (#8123)
Also group task source modules together

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-02-21 16:43:56 +02:00
Piotr Osiewicz
b9151b9506
Runnables: remove version field from the format (#8118)
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
2024-02-21 14:30:16 +01:00
Kirill Bulatov
2679457b02
Rename runnables into tasks (#8119)
Release Notes:

- N/A
2024-02-21 14:56:43 +02:00
Joseph T. Lyons
58a5a1eb8f
Automatically indent the cursor when adding a newline after a { in Gleam code files (#8097)
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)).
2024-02-20 23:37:15 -05:00
gmorenz
8f5d7db875
First pass at making a linux keymap (#8082)
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
2024-02-20 13:51:54 -08:00
Marshall Bowers
8178d347b6
Change default Markdown tab size (#8080)
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.
2024-02-20 13:18:40 -05:00
Philipp Schaffrath
db0eaca2e5
Rename scrollbar_thumb to be consistent with other style properties (#8004)
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>
2024-02-20 11:26:09 -05:00
Kirill Bulatov
0d2ad67b27
Add settings to configure terminal scroll limit (#8063)
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))
2024-02-20 16:14:59 +02:00
Kirill Bulatov
7065d6c46d
Use proper template for initial runnables config contents (#8064)
Release Notes:

- N/A
2024-02-20 16:14:50 +02:00
Ali Servet Donmez
e9f400a8bd
rust-analyzer check command is check and not checkOnSave (#8054)
Reference: https://rust-analyzer.github.io/manual.html#configuration

Release Notes:

- N/A
2024-02-20 14:06:07 +02:00
Piotr Osiewicz
f17d0b5729
Add static Runnables (#8009)
Part of #7108

This PR includes just the static runnables part. We went with **not**
having a dedicated panel for runnables.
This is just a 1st PR out of N, as we want to start exploring the
dynamic runnables front. Still, all that work is going to happen once
this gets merged.

Release Notes:

- Added initial, static Runnables support to Zed. Such runnables are defined in
`runnables.json` file (accessible via `zed: open runnables` action) and
they can be spawned with `runnables: spawn` action.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Pitor <pitor@zed.dev>
Co-authored-by: Beniamin <beniamin@zagan.be>
2024-02-19 18:41:43 +02:00
Thorsten Ball
251218954d
Add editor::OpenUrl action and bind to gx in Vim mode (#7972)
This adds one feature I've been missing a lot in Vim mode: `gx` to open
the URL under the cursor.

Technically, in Vim, `gx` opens more "paths", not just URLs, but I think
this is a good start.

Release Notes:

- Added `gx` to Vim mode to open the URL under the cursor.

Demo:


https://github.com/zed-industries/zed/assets/1185253/6a19490d-b61d-40b7-93e8-4819599f6977
2024-02-18 18:52:50 +01:00
Conrad Irwin
4c781b6455
vim netrw (#7962)
- Tidy up vim netrw bindings (c.f.
https://github.com/zed-industries/zed/issues/4270,
https://github.com/zed-industries/zed/pull/7757)
- Add vim commands for panels

Release Notes:

- vim: add commands to toggle panels `:E[xplore]`, `:C[ollab]`,
`:Ch[at]`, `:N[otification]`, `:A[I]`, `:te[rm]` (or `:T[erm]`).
2024-02-17 13:36:08 -07:00
Jack T
f19378135a
Add Lua file icon (#7926)
Release Notes: 

- Added Lua file icon and association ([7925](https://github.com/zed-industries/zed/issues/7925))
2024-02-17 17:59:25 +02:00
Vishal Bhavsar
96dcc385dd
vim: Implement Go To Previous Word End (#7505)
Activated by keystrokes g-e.



Release Notes:

- vim: Added `ge` and `gE` for go to Previous Word End.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-15 16:15:31 -07:00
Conrad Irwin
ea322e1d1c
Add "code_actions_on_format" (#7860)
This lets Go programmers configure `"code_actions_on_format": {
  "source.organizeImports": true,
}` so that they don't have to manage their imports manually

I landed on `code_actions_on_format` instead of `code_actions_on_save`
(the
VSCode version of this) because I want to run these when I explicitly
format
(and not if `format_on_save` is disabled).

Co-Authored-By: Thorsten <thorsten@zed.dev>

Release Notes:

- Added `"code_actions_on_format"` to control additional formatting
steps on format/save
([#5232](https://github.com/zed-industries/zed/issues/5232)).
- Added a `"code_actions_on_format"` of `"source.organizeImports"` for
Go ([#4886](https://github.com/zed-industries/zed/issues/4886)).

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-02-15 14:19:57 -07:00
Manohar_nalluri
e93dca5ec3
Incorrect file icons for .mjs, .mts, .cjs, .cts #7804 (#7815)
Release Notes:

- Added file extensions ([7804](https://github.com/zed-industries/zed/issues/7804))
2024-02-15 15:13:46 +02:00
Conrad Irwin
8e52cf1495
Add netrw bindings for vim (#7757)
This is now possible after #7647

Release Notes:

- Added vim bindings for project panel
([#4270](https://github.com/zed-industries/zed/issues/4270)).
2024-02-14 14:38:07 -07:00
Conrad Irwin
2294d99046
revert single channel click (#7738)
- Revert "collab tweaks (#7706)"
- Revert "2112 (#7640)"
- Revert "single click channel (#7596)"
- Reserve protobufs
- Don't revert migrations

Release Notes:

- N/A

**or**

- N/A
2024-02-13 12:53:49 -07:00
Yohann
ecd9b93cb1
Add C-w and C-u keymaps in vim mode (Fix #7691) (#7736)
Release Notes:
- Added C-w and C-u keymaps in vim mode
([#7691](https://github.com/zed-industries/zed/issues/7691))
2024-02-13 12:35:01 -07:00
Alvaro Gaona
2e7db57e16
Add Astro Support (#6896)
Attempt to add `@astrojs/language-server` and
[virchau13/tree-sitter-astro](https://github.com/virchau13/tree-sitter-astro).

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2024-02-12 10:10:40 -08:00
Yesterday17
9e17018416
Allow OpenAI API URL to be configured via assistant.openai_api_url (#7552)
Partially fixes #4321, since Azure OpenAI API can be converted to OpenAI
API.

Release Notes:

- Added `assistant.openai_api_url` setting to allow OpenAI API URL to be
configured.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-12 11:37:27 -05:00
Conrad Irwin
bd882c66d6
vim lifecycle (#7647)
Release Notes:

- Fixed :0 and :% in vim mode
([#4303](https://github.com/zed-industries/zed/issues/4303)).
- Improved keymap loading to not load vim key bindings unless vim is
enabled

**or**

- N/A
2024-02-10 16:21:13 -07:00
Jun
2f3ad9da4c
Use integer font size value in default settings (#7649)
Release Notes:

Fixed : default settings for terminal not containing a proper value for font size ([7469](https://github.com/zed-industries/zed/issues/7469))
2024-02-10 10:48:21 +02:00
Conrad Irwin
efe23ebfcd
single click channel (#7596)
- Open channel notes and chat on channel click
- WIP
- Fix compile error
- Don't join live kit until requested
- Track in_call state separately from in_room



Release Notes:

- Improved channels: you can now be in a channel without joining the
audio call automatically

**or**

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2024-02-09 14:18:27 -07:00
White Choco
bd390aabf4
Fix mis-description in default settings (#7564)
Change word from "Stable" to "Dev" of option `dev`



Release Notes:

- N/A
2024-02-08 10:19:18 -05:00
Gianni Rosato
73498f388a
Recognize More Multimedia Filetypes (#7557)
This PR recognizes the following filetypes and provides them with
appropriate icons: `.avi .heic .j2k .jfif .jp2 .jxl .m4a .m4v .mkv .mka
.mov .opus .qoi .wma .wmv .wv`.

It also corrects `.ogg` to display an audio icon, not a video icon.
Though the container supports video, `.ogg` files are most commonly
found containing audio-only bitstreams likely due to the popularity of
the Vorbis audio codec. VSCode recognizes OGG files as audio.

Here is an exhaustive list of the file formats this PR aims to
recognize, with a subjective commonality rating attached to each:

- `.avi`: Audio Video Interleave. Multimedia container format for video
and audio data. **Rating: 7/10**
- `.heic`: High Efficiency Image Format. The same thing as `.heif`,
which is currently recognized. **Rating: 6/10**
- `.j2k`: JPEG 2000. Bitmap image format for lossy or lossless
compression. **Rating: 3/10**
- `.jfif`: JPEG File Interchange Format. Alternative JPEG extension that
sometimes pops up on the Web. **Rating: 5/10**
- `.jp2`: JPEG 2000 again, same rating.
- `.jxl`: JPEG XL. Modern, versatile image format growing in popularity.
**Rating: 5/10**
- `.m4a`: MPEG-4 Audio. Audio file format using AAC (lossy) or ALAC
(lossless) codecs. **Rating: 8/10**
- `.m4v`: MPEG-4 Video. Video container format developed by Apple
similar to MP4. **Rating: 4/10**
- `.mkv`: Matroska Video. Multimedia container format for video, audio,
and subtitle tracks. **Rating: 8/10**
- `.mka`: Matroska Audio. Audio file format supporting several types of
audio compression algorithms. **Rating: 3/10**
- `.mov`: QuickTime Movie. Multimedia container format developed by
Apple. **Rating: 8/10**
- `.opus`: Opus Audio. Audio coding format for efficient real-time audio
streaming. **Rating: 7/10**
- `.qoi`: Quite OK Image. Modern lossless image format for fast encoding
& decoding. **Rating: 1/10**
- `.wma`: Windows Media Audio. Audio file format developed by Microsoft.
**Rating: 6/10**
- `.wmv`: Windows Media Video. Video file format developed by Microsoft.
**Rating: 7/10**
- `.wv`: WavPack. Free, open-source lossless audio compression format
similar to FLAC. **Rating: 2/10**

Again note that the commonality rating is subjective and may vary based
on the specific use cases users have for Zed and their software
environments. I hope some of these will be considered, as having
flexible filetype recognition greatly adds to the feeling of
completeness in an editor at what appears to be very little cost. Thank
you!

Release Notes:

- Adds icon associations for more multimedia types [#7551](https://github.com/zed-industries/zed/issues/7551).
2024-02-08 11:25:54 +02:00
Bennet Bo Fenner
ef8cab65b0 allow closing reply to preview with action
Co-Authored-By: Remco Smits <62463826+RemcoSmitsDev@users.noreply.github.com>
2024-02-07 21:14:36 +01:00
Thorsten Ball
db39b9dadc
Add ability to bind to pane::RevealInProjectPanel (#7487)
Previously it wasn't possible to create a keybinding for this action
because it required an argument.

Now the action takes the active item of the pane and if it's a
multi-buffer the first one.

This also adds a default keybinding for Vim mode: `-` will reveal the
file in the project panel.

Fixes #7485.

Release Notes:

- Added `pane::RevealInProjectPanel` as an action in the command
palette. ([#7485](https://github.com/zed-industries/zed/issues/7485)).

Co-authored-by: Antonio <antonio@zed.dev>
2024-02-07 12:50:22 +01:00
James Gee
7939673a7d
Jetbrains keymap - Movement between panes (#7464)
Release Notes:

- Improved Jetbrains keybindings to include cmd+alt+left/right to go
back and forwards between panes rather than the default previous / next
pane

Signed-off-by: James Gee <1285296+geemanjs@users.noreply.github.com>
2024-02-07 09:12:34 +02:00
Andrey Kuzmin
33d982b08a
Add Elm file icon (#7440)
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
2024-02-06 17:25:38 +02:00
Guillem Arias Fauste
b2ce515593
Add Prisma file icon (#7207)
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.
2024-02-06 13:34:46 +01:00
Caius Durling
6863b9263e
Add Terraform & HCL syntax highlighting (#6882)
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)).
2024-02-05 11:38:30 -08:00
Thorsten Ball
583ce44359
Fix cmd+k in terminal and fix sporadic keybind misses (#7388)
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>
2024-02-05 10:55:27 -07:00
Marshall Bowers
47329f4489
Add search.match_background colors to bundled themes (#7385)
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.
2024-02-05 11:13:38 -05:00
Thorsten Ball
223f45c65b
Remove default keybinds for navigating between docks/editors (#7381)
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>
2024-02-05 17:12:35 +01:00
Andrew Lygin
8da6e62914
Editor toolbar configuration (#7338)
Adds settings for hiding breadcrumbs and quick action bar from
the editor toolbar. If both elements are hidden, the toolbar disappears
completely.

Example:

```json
"toolbar": {
  "breadcrumbs": true,
  "quick_actions": false
}
```

- It intentionally doesn't hide breadcrumbs in other views (for
instance, in the search result window) because their usage there differ
from the main editor.
- The editor controls how breadcrumbs are displayed in the toolbar, so
implementation differs a bit for breadcrumbs and quick actions bar.

Release Notes:

- Added support for configuring the editor toolbar ([4756](https://github.com/zed-industries/zed/issues/4756))
2024-02-03 22:40:54 +02:00
Rashid Almheiri
d08d4174a5
Modify the default tab size of OCaml & OCaml Interface to 2 (#7315)
Thanks @pseudomata for the heads up.

Release Notes:
- N/A
2024-02-03 12:04:15 +02:00
Conrad Irwin
f09da1a1c8
vim hml (#7298)
- Add a setting for `vertical_scroll_offset`
- Fix H/M/L in vim with scrolloff



Release Notes:

- Added a settings for `vertical_scroll_offset`
- vim: Fix H/M/L with various values of vertical_scroll_offset

---------

Co-authored-by: Vbhavsar <vbhavsar@gmail.com>
Co-authored-by: fdionisi <code@fdionisi.me>
2024-02-02 19:24:36 -07:00
Conrad Irwin
074acacdf7
Do more on channel join (#7268)
This change makes it so that if you are the first to join a channel,
your project is automatically shared.

It also makes it so that if you join a channel via a link and there are
no shared projects, you open the notes instead of an empty workspace
with nothing.

This is to try and address the discoverability of project sharing: we've
had
two reviews that have talked about channels, but not talked about
sharing
projects into them, which makes me suspect they didn't know about the
feature.

Release Notes:

- Added a setting `share_on_join` (defaulting to true). When set, and
you join an empty channel, your project is automatically shared.
2024-02-02 09:52:30 -07:00
Marshall Bowers
33e5ba6278
Revert "Add YAML file type icon (#7185)" (#7286)
This PR reverts the addition of the YAML icon, as it doesn't look good
at the moment:

<img width="305" alt="Screenshot 2024-02-02 at 10 55 16 AM"
src="https://github.com/zed-industries/zed/assets/1486634/2fe2ddd5-5b73-4c52-a121-562d07352005">

This reverts commit a853a80634.

Release Notes:

- N/A
2024-02-02 11:02:10 -05:00
Rashid Almheiri
998f6cf80d
Add OCaml support (#6929)
This pull request implements support for the [OCaml
Language](https://ocaml.org/).

### Additions
- [x]
[tree-sitter-ocaml](https://github.com/tree-sitter/tree-sitter-ocaml)
grammar
- [x] Highlight, Indents, Outline queries
- [x] A new file icon for .ml(i) files. Based on
[ocaml/ocaml-logo](https://github.com/ocaml/ocaml-logo/blob/master/Colour/SVG/colour-transparent-icon.svg)
- [x] LSP Integration with
[ocaml-language-server](https://github.com/ocaml/ocaml-lsp)
- [x] Completion Labels
- [x] Symbol Labels

### Bug Fixes
- [x] Improper parsing of LSP headers. 

### Missing [will file a separate issue]
- Documentation on completionItem, requires: `completionItem/resolve`
with support for `documentation` as a provider.

### Screenshots

<details><summary>Zed</summary>
<img width="1800" alt="Screenshot 2024-02-01 at 03 33 20"
src="https://github.com/zed-industries/zed/assets/69181766/e17c184e-203e-40c3-a08f-4de46226b79c">
</details>

Release Notes:
- Added OCaml Support
([#5316](https://github.com/zed-industries/zed/issues/5316)).

> [!NOTE]
> Partially completes #5316 
> To complete #5316:
> 1. addition of a reason tree-sitter grammar.
> 2. opam/esy integration, however it may be better as it's own plugin.
2024-02-02 16:58:07 +02:00
Bennet Bo Fenner
ce4c15dca6
Show diagnostics in scrollbar (#7175)
This PR implements support for displaying diagnostics in the scrollbar,
similar to what is already done for search results, symbols, git diff,
...

For example, changing a field name (`text`) without changing the
references looks like this in `buffer.rs` (note the red lines in the
scrollbar):

![image](https://github.com/zed-industries/zed/assets/53836821/c46f0d55-32e3-4334-8ad7-66d1578d5725)

As you can see, the errors, warnings, ... are displayed in the scroll
bar, which helps to identify possible problems with the current file.

Relevant issues: #4866, #6819

Release Notes:

- Added diagnostic indicators to the scrollbar
2024-02-02 12:10:42 +02:00
Ocean
5ed3b44686
Add rename to JetBrains keymaps (#7263)
Add rename actions to JetBrains keymaps.

Closes #7261.

Release Notes:

- Added rename keybindings to JetBrains keymap ([#7261](https://github.com/zed-industries/zed/issues/7261)).
2024-02-02 09:55:54 +02:00
Conrad Irwin
3521b50405
vim: Fix , and ; in visual mode (#7230)
Release Notes:

- vim: Fixed , and ; in visual mode
([#7182](https://github.com/zed-industries/zed/issues/7182)).
2024-02-01 10:13:30 -07:00
Dairon M
97be0a930c
Add syntax highlighting and LSP (erlang_lsp) for Erlang (#7093)
This pull request implements support for the [Erlang
Language](https://erlang.org/).

**It adds:**

* [tree-sitter-erlang](https://github.com/WhatsApp/tree-sitter-erlang)
grammar
highlights (Licensed under Apache-2 from WhatsApp which is compatible
with Zed licensing model), folds and indents
* Erlang file icon based on the [official
one](https://www.erlang.org/doc/erlang-logo.png)
* [erlang_ls](https://github.com/erlang-ls/erlang_ls) support

Fixes https://github.com/zed-industries/zed/issues/4939, possibly a
duplicate of https://github.com/zed-industries/zed/pull/7085 with more
features. Suppose @wingyplus wants to join efforts here.

**To complete (out of scope for this PR):**

* Support for the ELP language server from WhatsApp. CC @robertoaloi
* Better indentation handling, need something like
`indentNextLinePattern` in VS Code

**Screenshots:**

![Screenshot 2024-01-30 at 11 03 51
AM](https://github.com/zed-industries/zed/assets/168440/5289c245-9edd-46b8-b443-d7b3210f6510)
![Screenshot 2024-01-30 at 11 01 19
AM](https://github.com/zed-industries/zed/assets/168440/bd22b322-5344-44e6-b5f7-6e352fb3deef)
![Screenshot 2024-01-30 at 11 01 37
AM](https://github.com/zed-industries/zed/assets/168440/f28f6a15-383e-4719-8a87-fceae5062436)
![Screenshot 2024-01-30 at 11 02 03
AM](https://github.com/zed-industries/zed/assets/168440/980d5213-0367-4a08-86eb-5743dfa628eb)
![Screenshot 2024-01-30 at 11 02 19
AM](https://github.com/zed-industries/zed/assets/168440/ea998891-604d-48d6-929f-ae4c1bb3fae1)

Outline: 
![Screenshot 2024-01-31 at 9 09 36
AM](https://github.com/zed-industries/zed/assets/168440/46d56d94-21c3-414d-84fb-9251fa2506ab)



**Release Notes:**

* Added Erlang Support
([7093](https://github.com/zed-industries/zed/pull/7093)).

---------

Signed-off-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
Co-authored-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
2024-02-01 18:54:26 +02:00
thurain
a853a80634
Add YAML file type icon (#7185)
Add YAML file type icon from
[file-icons/icons](https://github.com/file-icons/icons)

https://github.com/file-icons/icons/blob/master/svg/YAML.svg
Release Notes:
- Added YAML file type icon.

---------

Co-authored-by: d1y <chenhonzhou@gmail.com>
2024-02-01 16:13:07 +02:00
Thorsten Ball
e65a76f0ec
Add ability to navigate to/from docks via keybindings (#7141)
This adds the ability to navigate to/from docks (Terminal, Project,
Collaboration, Assistant) via keybindings.

When using the `ActivatePaneInDirection` keybinding from the
left/bottom/right dock, we check whether the movement is towards the
center panel. If it is, we focus the last active pane.

Fixes https://github.com/zed-industries/zed/issues/6833 and it came up
in a few other tickes/discussions.

Release Notes:

- Added ability to navigate to docks and back to the editor using the
`workspace::ActivatePaneInDirection` action (by default bound to `Ctrl-w
[hjkl]` in Vim mode).
([#6833](https://github.com/zed-industries/zed/issues/6833)).

## Drawback

There's this weird behavior: if you start Zed and no files are opened,
you focus terminal, go left (project panel), then back to right to
terminal, the terminal isn't focused. Even though we focus it in the
code.

Maybe this is a bug in the current focus handling code?

## Demo


https://github.com/zed-industries/zed/assets/1185253/5d56db40-36aa-4758-a3bc-7a0de20ce5d7

---------

Co-authored-by: Piotr <piotr@zed.dev>
2024-02-01 12:18:12 +01:00
Conrad Irwin
5e64d45194
Remove links to docs.zed.dev (#7187)
Release Notes:

- N/A
2024-01-31 22:26:15 -07:00
Mikayla Maki
f98d636203
WIP: Add a setting to visually redact enviroment variables (#7124)
Release Notes:

- Added bash syntax highlighting to `.env` files. 
- Added a `private_files` setting for configuring which files should be
considered to contain environment variables or other sensitive
information.
- Added a `redact_private_values` setting to add or remove censor bars
over variable values in files matching the `private_files` patterns.
-(internal) added a new `redactions.scm` query to our language support,
allowing different config file formats to indicate where environment
variable values can be identified in the syntax tree, added this query
to `bash`, `json`, `toml`, and `yaml` files.

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-01-31 11:42:09 -08:00
Conrad Irwin
135bca262c
vim: Make H/M/L work in visual mode (#7166)
Release notes:
- N/A
2024-01-31 12:13:35 -07:00
Pyae Sone Aung
6e443ac298
Add PHP file type icon (#7159)
Add PHP file type icon from
[file-icons/icons](https://github.com/file-icons/icons)


[https://github.com/file-icons/icons/blob/master/svg/PHP.svg](https://github.com/file-icons/icons/blob/master/svg/PHP.svg)

<img width="408" alt="Screenshot 2024-01-31 at 23 14 55"
src="https://github.com/zed-industries/zed/assets/44226349/26c3d19d-3a5d-4fc6-b551-f5351ba62b7d">


Release Notes:

- Added PHP file type icon.
2024-01-31 12:14:28 -05:00
Julia
7cb97e57f9 Add debounce for re-querying completion documentation 2024-01-31 09:50:26 -05:00
Felix Salazar
cbcaca4153
Show highlighted symbol in the scrollbar (#7029)
Release Notes:

- Added highlighted symbols to the scrollbar; partially mentioned in:
  - https://github.com/zed-industries/zed/issues/5308
  - https://github.com/zed-industries/zed/issues/4866
2024-01-30 13:57:42 -08:00
Derrick Laird
a5826e22f5
Add Go file icon (#7110)
![IMG_4664](https://github.com/zed-industries/zed/assets/8725798/75436116-7c7e-4ae6-b76c-13f21c52bee8)

Release Notes:

- Added icon to `.go` files
2024-01-30 15:48:33 -05:00
Conrad Irwin
dfbcaf36fc
nightly url setting (#7037)
Release Notes:

- Added the ability to set settings per-release stage
- Added a `"server_url"` setting
2024-01-30 11:35:07 -07:00
d1y
a0582d02b9
Make avif/heif/webp files to use image icon (#7063)
The Wikipedia Link:

- https://en.wikipedia.org/wiki/AVIF
- https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
- https://en.wikipedia.org/wiki/WebP

Release Notes:

- Made avif/heif/webp files to use an image icon
2024-01-30 11:58:56 +02:00
Thorsten Ball
7b8bd97652
vim: implement <space> in normal mode (#7011)
This fixes #6815 by implementing `<space>` in normal mode in Vim. Turns
out that `<space>` behaves like a reverse `<backspace>` (which we
already had): it goes to the right and, if at end of line, to the next
line.

That means I had to touch `movement::right`, which is used in a few
places, but it's documentation said that it would go to the next line,
which it did *not*. So I changed the behaviour.

But I would love another pair of eyes on this, because I don't want to
break non-Vim behaviour.

Release Notes:

- Added support for `<space>` in Vim normal mode: `<space>` goes to the
right and to next line if at end of line.
([#6815](https://github.com/zed-industries/zed/issues/6815)).
2024-01-30 10:47:39 +01:00
d1y
dc5f4c8719
Add CSS file type icon (#7062)
The SVG icon RAW link: https://www.svgrepo.com/svg/473577/css3
The Licensing https://www.svgrepo.com/page/licensing/#CC0

<img width="309" alt="image"
src="https://github.com/zed-industries/zed/assets/45585937/4b1fa935-144f-4c02-a378-b0974e4d0b39">


Release Notes:

- Added a CSS file type icon
2024-01-30 11:37:48 +02:00
Thorsten Ball
cddc0fbf92
vim: fix t not being repeatable with , (#7007)
This fixes `t` not being repeatable with `,` and `;` in normal mode.

Release Notes:

- Fixed `t` in Vim mode not being repeatable with `,` or `;`.

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-01-30 09:17:19 +01:00
Vishal Bhavsar
31e9526544
vim: Add support for moving to first, middle and last visible lines (H, L, M) (#6919)
This change implements the vim
[motion](https://github.com/vim/vim/blob/master/runtime/doc/motion.txt)
commands to move the cursor to the top, middle and bottom of the visible
view. This feature is requested in
https://github.com/zed-industries/zed/issues/4941.

This change takes inspiration from
[crates/vim/src/normal/scroll.rs](https://github.com/zed-industries/zed/blob/main/crates/vim/src/normal/scroll.rs).

A note on the behavior of these commands: Because
`NeovimBackedTestContext` requires compatibility with nvim, the current
implementation causes slightly non-standard behavior: it causes the
editor to scroll a few lines. The standard behavior causes no scrolling.
It is easy enough to account for the margin by adding
`VERTICAL_SCROLL_MARGIN`. However, doing so will cause test failures due
to the disparity between nvim and zed states. Perhaps
`NeovimBackedTestContext` should have a switch to be more tolerant for
such cases.

Release Notes:

- Added support for moving to top, middle and bottom of the screen in
vim mode (`H`, `M`, and `L`)
([#4941](https://github.com/zed-industries/zed/issues/4941)).
2024-01-29 20:58:24 -07:00
Pseudomata
d694017d05
Add Haskell file type icon (#6995)
Small change to add the Haskell logo as a file icon. Screenshot below
shows what this looks like.

![CleanShot 2024-01-29 at 11 21
30@2x](https://github.com/zed-industries/zed/assets/132238190/b484c679-965a-4e73-88dc-ebb670a0f390)
2024-01-29 11:32:35 -05:00
d1y
8263da02bd
Make .jsonc icon use storage icon (#6972)
Jsonc is a simplified json format which allows comments and unquoted
values delimited by whitespace. A jsonc formatted file can be
unambiguously transformed to a json file. Comments will be stripped out
and quotes added.

Release Notes:

- Added an icon for .jsonc files
2024-01-29 13:47:23 +02:00
Brooks Swinnerton
c0c0abae56
Add support for u and U in vim visual mode 2024-01-28 15:13:09 -05:00
d1y
4fc01163da
Add Vue file icon (#6930)
https://github.com/vuejs/art/blob/master/white-on-dark-logo.svg
<img width="222" alt="image"
src="https://github.com/zed-industries/zed/assets/45585937/2839dd7e-ea25-4f9b-aac9-2437f1c3df23">

Release Notes:

- Added icon for `.vue` files.
2024-01-28 12:32:43 -05:00
d1y
e38489196d
Make .gitkeep icon use VCS icon (#6931)
This should be a standard recognized by everyone

```bash
mkdir todo
touch todo/.gitkeep # just placeholder
git add todo
git commit
```

Release Notes:

- Added icon for `.gitkeep` files.
2024-01-28 16:30:30 +02:00
Noritada Kobayashi
3493e71ad4
Add Ruby file icon (#6922)
This icon is designed based on [Ruby's official logo], to harmonize with
the other icons.
It is deformed and simplified to be human-recognizable, even at letter
size.

[Ruby's official logo]: https://www.ruby-lang.org/en/about/logo/

Release Notes:

- Added Ruby file icon.
2024-01-28 13:46:32 +02:00
Marshall Bowers
5f1dcb76fe
Load JSON themes (#6893)
This PR changes the theme loading to use the JSON themes bundled with
the binary rather then the Rust theme definitions.

### Performance

I profiled this using `cargo run --release` to see what the speed
differences would be now that we're deserializing JSON:

**Before:** `ThemeRegistry::load_user_themes` took 16.656666ms
**After:** `ThemeRegistry::load_user_themes` took 18.784875ms

It's slightly slower, but not by much. There is probably some work we
could do here to bring down the theme loading time in general.

Release Notes:

- N/A
2024-01-27 16:03:04 -05:00
Marshall Bowers
a2efc8da7a
Add player colors to serialized themes (#6887)
This PR adds player colors to serialized themes.

Release Notes:

- N/A
2024-01-27 13:50:33 -05:00
Marshall Bowers
0fe0683ef4
Add serialized versions of themes (#6885)
This PR adds serialized versions of each of the themes that currently
ship with Zed.

In a future PR we'll be looking to make these the canonical
representations of the built-in themes.

Note that we're intentionally repurposing the `theme_importer` to do
this, so that crate is a bit rough-and-ready at the moment.

Release Notes:

- N/A
2024-01-27 13:35:43 -05:00
Marshall Bowers
c3110d3dce
Rename BellBadged to BellDot (#6820)
This PR renames the `BellBadged` icon to `BellDot` to be a bit clearer
as to what its contents are.

Release Notes:

- N/A
2024-01-26 18:48:16 -05:00
David Rachmaninoff
62365e6a29
Add a badge to the bell icon on new notifications (#6751)
It changes the icon if a new notification event is consumed and changes
it back to normal upon toggling NotificationPanel.

Added a new field to NotificationPanel:
	- have_unseen_notifications: bool

Added a new icon asset
	- IconName::BellBadged => "assets/icons/bell_badged.svg"

Release Notes:

- Added a badge to bell icon for new notifications
([#6721](https://github.com/zed-industries/zed/issues/6721)).
2024-01-26 18:31:17 -05:00
Lino Le Van
81aac492bd
Add Deno LSP support (#5816)
This PR adds support for the deno LSP. Should be reviewable now.

Release Notes:

- Added support for the Deno LSP
([#5361](https://github.com/zed-industries/zed/issues/5361)).
2024-01-25 17:44:51 -08:00
Antonio Scandurra
e3157f7212 Remove unused font 2024-01-24 13:14:47 +01:00
Joseph T. Lyons
1d6390254d Update JetBrains keymap 2024-01-24 00:34:26 -05:00
Marshall Bowers
74cf1992a7
Remove unused screenshot (#4224)
This PR removes an unused screenshot from the `assets/` directory.

As a note, we should probably be careful about what kinds of extraneous
binary assets we're committing to the repo (especially ones not required
for Zed itself), as these can bloat the repo size.

Release Notes:

- N/A
2024-01-23 14:28:04 -05:00
Conrad Irwin
29ac1fd081 Merge remote-tracking branch 'origin/main' into chat-font-size 2024-01-20 14:51:53 -07:00
Conrad Irwin
778856c101 Add a setting "use_autoclose" to control autoclose
Also disable autoclose for Chat
2024-01-20 13:33:03 -07:00
Conrad Irwin
72689b08cc shift-enter for newline in chat 2024-01-20 13:31:19 -07:00
Max Brunsfeld
0858db9ebb
Autocomplete mentions (#4171)
Release Notes:

- Added autocomplete for @-mentions in the chat panel.
2024-01-19 17:03:56 -08:00
Max Brunsfeld
c8adde32de Add shift-enter binding for newline in auto-height editors 2024-01-19 16:03:08 -08:00
Conrad Irwin
137e219830
Don't toggle WHOLE_WORD in vim search (#4165)
Fixes */# in visual mode, and avoids setting up irritating state.

[[PR Description]]

Release Notes:

- vim: Improved `*` and `#` to not toggle Zed's search state. Instead we
now use the regex to identify start and end of words (more like vim).
2024-01-19 15:02:38 -07:00
Conrad Irwin
0479ebc26d Don't toggle WHOLE_WORD in vim search
Fixes */# in visual mode, and avoids setting up irritating state.
2024-01-19 10:58:55 -07:00
Joseph T. Lyons
595428a8b1 Rename show cursors to display cursor names 2024-01-19 11:37:57 -05:00
Joseph T. Lyons
0062cc000b Allow cursors to be shown via a command 2024-01-19 02:58:30 -05:00
Marshall Bowers
f3a76c8636
Remove VS Code themes (#4139)
This PR removes the VS Code themes from the `assets/` directory, as
we're not currently using them (and it's unlikely we will in their
current state).

Release Notes:

- N/A
2024-01-18 17:52:22 -05:00
Nate Butler
29df128d31
Add CONTRIBUTING.md (#3656)
Written by @iamnbutler 

This PR adds a basic CONTRIBUTING.md. It has a few links that need to be
added, which we marked as coming soon.

Here are a number of follow up tasks we need to do:

- [ ] Add CLA link
- [ ] Add public roadmap link
- [ ] Add link to channels doc once it is up
- [ ] Add link explaining how to find a channel related to your
contribution or or to create one

Release Notes:

- N/A
2024-01-17 13:12:14 -05:00
Thorsten Ball
04922d649c Fix missing Ctrl-[ bindings in Vim mode
This "adds" the keybindings I was missing in Vim mode (e.g. `Ctrl-[` to
cancel a selection) by fixing the definitions in the keymap from
`Ctrl+[` to `Ctrl-[`.
2024-01-17 12:22:05 +01:00
Mikayla Maki
d00067cd86
Switch project search deploy behavior to be isolated to a pane (#4072)
This adjusts the solution in
https://github.com/zed-industries/zed/pull/4014 to fix the double-focus
issue, allowing each pane's project search to work independently.

Release Notes:

- Changed the name of the `workspace::DeploySearch` action to
`pane::DeploySearch` and changed it's behavior to open a new search OR
focus an existing project search in the current pane.
(https://github.com/zed-industries/community/issues/2395)
2024-01-16 10:41:57 -08:00