Commit log

a0b2614 Add unique lines command (#7526)

Click to expand commit body
Changes `Editor::manipulate_lines` to allow line adding and removal
through callback function.

- Added `editor::UniqueLinesCaseSensitive` and `editor::UniqueLinesCaseInsensitive` commands
([#4831](https://github.com/zed-industries/zed/issues/4831))

dalton-oliveira created

89b1e76 Fix gopls langserver downloads (#7571)

Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/7534 by not requiring
assets for gopls and vscode-eslint langservers — those two are the only
ones in Zed that do not use assets directly when determining langserver
version and retrieving those.
All other servers deal with assets, hence require those to be present.

The problem with https://github.com/tamasfe/taplo/releases is that they
host multiple binary releases in the same release list, so for now the
code works because only the langserver has assets — but as soon as
another release there gets assets, it will break again.
We could filter out those by names also, but they also tend to change
(and can be edited manually), so keeping it as is for now.

Release Notes:

- Fixed gopls language server downloads
([7534](https://github.com/zed-industries/zed/issues/7534))

Kirill Bulatov created

f734365 Avoid another confirmation when submitting/discarding feedback (#7569)

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

Release Notes:

- Fixed feedback modal spawning extra confirmations on cancel and submit
([7515](https://github.com/zed-industries/zed/issues/7515))

Kirill Bulatov created

d457eef blade: fix path rasterization (#7546)

Click to expand commit body
There were mistakes in the blending mode, primitive topology, and the
equation.

![gpui-text-selection](https://github.com/zed-industries/zed/assets/107301/13f1285e-1338-4c87-b1bb-7e426606f939)



Release Notes:
- N/A

Dzmitry Malyshau created

00024b7 Uprev blade to 26bc5e8 (#7556)

Click to expand commit body
Picks up https://github.com/kvark/blade/pull/73 to make it possible to
start experimenting with GLES backend.

Release Notes:
- N/A

Dzmitry Malyshau created

73498f3 Recognize More Multimedia Filetypes (#7557)

Click to expand commit body
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).

Gianni Rosato created

61b8d36 markdown_preview: Improved markdown rendering support (#7345)

Click to expand commit body
This PR improves support for rendering markdown documents.

## After the updates


https://github.com/zed-industries/zed/assets/18583882/48315901-563d-44c6-8265-8390e8eed942

## Before the updates


https://github.com/zed-industries/zed/assets/18583882/6d7ddb55-41f7-492e-af12-6ab54559f612

## New features

- @SomeoneToIgnore's [scrolling feature
request](https://github.com/zed-industries/zed/pull/6958#pullrequestreview-1850458632).
- Checkboxes (`- [ ]` and `- [x]`)
- Inline code blocks.
- Ordered and unordered lists at an arbitrary depth.
- Block quotes that render nested content, like code blocks.
- Lists that render nested content, like code blocks.
- Block quotes that support variable heading sizes and the other
markdown features added
[here](https://github.com/zed-industries/zed/pull/6958).
- Users can see and click internal links (`[See the docs](./docs.md)`).

## Notable changes

- Removed dependency on `rich_text`.
- Added a new method for parsing markdown into renderable structs. This
method uses recursive descent so it can easily support more complex
markdown documents.
- Parsing does not happen for every call to
`MarkdownPreviewView::render` anymore.

## TODO

- [ ] Typing should move the markdown preview cursor.

## Future work under consideration

- If a title exists for a link, show it on hover.
- Images. 
- Since this PR brings the most support for markdown, we can consolidate
`languages/markdown` and `rich_text` to use this new renderer. Note that
the updated inline text rendering method in this PR originated from
`langauges/markdown`.
- Syntax highlighting in code blocks.
- Footnote references.
- Inline HTML.
- Strikethrough support.
- Scrolling improvements:
- Handle automatic preview scrolling when multiple cursors are used in
the editor.
- > great to see that the render now respects editor's scrolls, but can
we also support the vice-versa (as syntax tree does it in Zed) — when
scrolling the render, it would be good to scroll the editor too
- > sometimes it's hard to understand where the "caret" on the render
is, so I wonder if we could go even further with its placement and place
it inside the text, as a regular caret? Maybe even support the
selections?
- > switching to another markdown tab does not change the rendered
contents and when I call the render command again, the screen gets
another split — I would rather prefer to have Zed's syntax tree
behavior: there's always a single panel that renders things for whatever
tab is active now. At least we should not split if there's already a
split, rather adding the new rendered tab there.
- > plaintext URLs could get a highlight and the click action

## Release Notes

- Improved support for markdown rendering.

Kieran Gill created

cbe7a12 Add information to Copilot sign-in UI when disabled (#7496)

Click to expand commit body
I'd love to take on fixing this but:

1. I don't think this is the right solution - it would be really nice to
have something actionable that I could do when presented with this
message.
2. Should signing in to Copilot be independent from whether it's
enabled? You can only access the sign-in modal when `features.copilot`
isn't disabled, but when `show_copilot_suggestions` is `false` the
server is disabled but you can't sign in. So I guess another solution
might be to just not show the UI if copilot suggestions are disabled?
3. I don't know what other circumstances could trigger the empty modal.
I see `Status::Error` and that seems like it might be important to
surface gracefully?

Would love some thoughts on this

Release Notes:

- Improved UX for enabling Copilot when it's disabled in settings

Robert Clover created

ccc6d76 Clean up `util::paths` (#7536)

Click to expand commit body
This PR cleans up the path definitions in `util::paths` following the
Linux merge.

We were using a bunch of target-specific compilation that made these
declarations kind of messy, when really we can limit the conditional
compilation to just the base directories that we use as the basis for
the other directories.

Release Notes:

- N/A

Marshall Bowers created

7b03e97 Reload grammars in extensions when they are updated on disk (#7531)

Click to expand commit body
Release Notes:

- N/A

---------

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

Max Brunsfeld , Marshall Bowers , and Marshall created

f2a4dba Fix typo in `mark_language_loaded` doc comment (#7533)

Click to expand commit body
This PR fixes a small typo in the `mark_language_loaded` doc comment.

Release Notes:

- N/A

Marshall Bowers created

219ec91 Fix compile errors on Linux (#7527)

Click to expand commit body
Added some missing trait functions and `unimplemented` markings

Release Notes:

- N/A

Antar created

6cdd779 terminal: strikethrough text (#7507)

Click to expand commit body
#7363 added support for rendering strikethrough text, so now we can
handle this case in the terminal.

Should close: #7434

Before:

![image](https://github.com/zed-industries/zed/assets/53836821/cb7a4eae-5bc9-425c-974d-07a9f089917a)

After:

![image](https://github.com/zed-industries/zed/assets/53836821/5aaacee2-95bc-4039-972d-96bd7c01ea59)

Release Notes:

- Fixed rendering strikethrough text inside the terminal #7434

Bennet Bo Fenner created

f55aba5 Fix panic! caused by bad utf16 clipping (#7530)

Click to expand commit body
Release Notes:

- Fixed a panic in diagnostics with emojis

**or**

- N/A

Conrad Irwin created

374c8a4 Reload theme using `ThemeSettings::reload_current_theme` (#7522)

Click to expand commit body
This PR updates the various spots where we reload the theme to use
`ThemeSettings::reload_current_theme` instead of duplicating the code
each time.

Release Notes:

- N/A

Marshall Bowers created

45cf36e theme_importer: Add `--output` flag for outputting the theme to a file (#7486)

Click to expand commit body
```bash
cargo run -p theme_importer -- dark-plus-syntax-color-theme.json --output output.json
```

Release Notes:

- N/A

---------

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

d1y and Marshall Bowers created

e6dad23 chat: closing reply preview with action (#7517)

Click to expand commit body
This is a follow up to #7170. Closing the reply to preview overlay is
now configurable with an action (keybinding set escape in the default
keymap).


https://github.com/zed-industries/zed/assets/53836821/d679e734-f90b-4490-8e79-7dfe5407988a


Release Notes:
- N/A

Joseph T. Lyons created

2f4bb79 Reload themes defined in extensions (#7520)

Click to expand commit body
This PR extends the extension directory watcher to also watch and reload
themes defined in extensions.

Release Notes:

- N/A

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

Marshall Bowers and Max created

31d9edf Fix Terraform syntax highlighting (#7518)

Click to expand commit body
https://github.com/zed-industries/zed/pull/7467 introduced a new
`grammar` field in the language configuration files.
The underlying tree-sitter grammar for Terraform should be `hcl` instead
of `terraform`. This PR fixes that typo.

Release Notes:

- N/A

Daniel Banck created

eaadf56 Testing buf breaking (#7475)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

5ded865 [official] Linux port via Blade (#7343)

Click to expand commit body
## Motivation

I :heart: Zed! It's lightning fast and has great UX. I want it to run as
well on all major platforms. I'm currently using Linux most actively.
[Blade](https://github.com/kvark/blade) is a good candidate for
providing GPU access: it supports Vulkan, Metal, and GLES/WebGL. Its
abstraction is extremely thin, while having one of the nicest GPU APIs.
Codebase is also tiny. Checkout [the meetup
recording](https://www.youtube.com/watch?v=63dnzjw4azI&t=623s) from a
year ago.
I believe these projects make a good match :rocket: !

### Why this is a bad idea

If Zed team wants to use off-the-shelf components from Rust ecosystem,
then Blade is certainly at disadvantage here, since it's not widely
used. It would rely on Zed team adding necessary features in a branch,
then maybe upstreaming some of them. That is to say, it's unclear if
this can be avoided with more popular alternatives - being flexible with
any local changes is a good ability.

### Why it's not too bad

Blade uses [WGSL](https://www.w3.org/TR/WGSL) shaders, similar to `wgpu`
and `arcana`, but without the binding decorations. So this aspect of the
product is nicely portable.

## Progress

- [ ] Platforms
  - [x] X11 (via xcb)
    - [ ] input handling
    - [ ] get proper content size
  - [ ] Windows
  - [ ] Replace the existing Metal backend
- [ ] Text System
  - [ ] shaping
  - [ ] glyph rasterization
- [x] Texture atlas
- [ ] Rendering
  - [x] basic primitives
  - [x] path rendering
  - [x] sprite rendering
- [ ] media surfaces
- [ ] CI

## Current status
Zed starts up but crashes on text-system related checks.

![zed-linux-1](https://github.com/zed-industries/zed/assets/107301/ba536218-4d2c-43c9-ae6c-bef69b54bd0c)

Mikayla Maki created

3a53db6 Merge branch 'main' into kvark-linux

Mikayla created

6edeea7 Add logic for managing language and theme extensions (#7467)

Click to expand commit body
This PR adds the initial support for loading extensions in Zed.

### Extensions Directory

Extensions are loaded from the extensions directory.

The extensions directory has the following structure:

```
extensions/
  installed/
    extension-a/
      grammars/
      languages/
    extension-b/
      themes/
  manifest.json
```

The `manifest.json` file is used internally by Zed to keep track of
which extensions are installed. This file should be maintained
automatically, and shouldn't require any direct interaction with it.

Extensions can provide Tree-sitter grammars, languages, and themes.

Release Notes:

- N/A

---------

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

Max Brunsfeld and Marshall created

ef8cab6 allow closing reply to preview with action

Click to expand commit body
Co-Authored-By: Remco Smits <62463826+RemcoSmitsDev@users.noreply.github.com>

Bennet Bo Fenner and Remco Smits created

be455f7 Restore nanoid dependency

Mikayla created

f507698 Fix a few out of date warnings

Mikayla created

67555ee Merge branch 'main' into kvark-linux

Mikayla created

6b598a0 chat: fix autocompletion for usernames with dash (#7514)

Click to expand commit body
Github usernames are allowed to contain `-`, but the autocompletion was
not working correctly.
We added `-` as an allowed character for markdown files. We are not
aware of any completions for markdown files, so this should be fine to
add.


Before:

![image](https://github.com/zed-industries/zed/assets/53836821/5b456ed6-3098-48e8-90db-f5f42b4aa535)

After:

![image](https://github.com/zed-industries/zed/assets/53836821/a544f465-0b68-46f5-9a15-83b4c755c3c0)


Release Notes:

- Fixed autocompletion for usernames with dash character in the chat
message editor

Co-authored-by: Remco Smits <62463826+RemcoSmitsDev@users.noreply.github.com>

Bennet Bo Fenner and Remco Smits created

3734a39 Mark TODOs and prep for merging main

Mikayla created

c1ada08 docs: Update OPAM installation instructions (#7510)

Click to expand commit body
Use the new installation procedures located at
https://ocaml.org/install.

Release Notes:
- N/A

Rashid Almheiri created

07fce7a Stop display link when window is occluded (#7511)

Click to expand commit body
Release Notes:

- Fixed a bug that caused the window to become unresponsive after
foregrounding.

---------

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

Antonio Scandurra and Conrad created

114889b v0.123.x dev

Joseph T. Lyons created

83cffdd Use collections::{HashMap, HashSet} instead of its std:: counterpart (#7502)

Kirill Bulatov created

c322179 Initialize the `SystemAppearance` using the app's global window appearance (#7508)

Click to expand commit body
This PR changes our approach to initializing the `SystemAppearance` so
that we can do it earlier in the startup process.

Previously we were using the appearance from the window, meaning that we
couldn't initialize the value until we first opened the window.

Now we read the `window_appearance` from the `AppContext`. On macOS this
is backed by the
[`effectiveAppearance`](https://developer.apple.com/documentation/appkit/nsapplication/2967171-effectiveappearance)
on the `NSApplication`.

We currently still watch for changes to the appearance at the window
level, as the only hook I could find in the documentation is
[`viewDidChangeEffectiveAppearance`](https://developer.apple.com/documentation/appkit/nsview/2977088-viewdidchangeeffectiveappearance),
which is at the `NSView` level.

In my testing this makes it so Zed appropriately chooses the correct
light/dark theme on startup.

Release Notes:

- N/A

Marshall Bowers created

b59e110 Attempt to fix random lag (#7506)

Click to expand commit body
Co-Authored-By: Antonio <antonio@zed.dev>
Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>

Release Notes:

- N/A

**or**

- N/A

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>

Conrad Irwin , Antonio , Thorsten , and Mikayla created

42a5081 Use try_from_bytes for windows build (#7500)

Click to expand commit body
Reduce windows build error.

Release Notes:

- N/A

白山風露 created

c7b0221 theme_importer: Read theme name from VS Code theme (#7489)

Click to expand commit body
apply theme_name(fallback use "")

Release Notes:

- N/A

d1y created

ad3940c text rendering: support strikethroughs (#7363)

Click to expand commit body
<img width="1269" alt="image"
src="https://github.com/zed-industries/zed/assets/18583882/d4c93033-b2ac-4ae0-8e12-457f256ee869">

Release Notes:

- Added support for styling text with strikethrough.

Related: 
- https://github.com/zed-industries/zed/issues/5364
- https://github.com/zed-industries/zed/pull/7345

Kieran Gill created

55129d4 Revert "Use Fx* variants of HashMap and HashSet everywhere in Zed" (#7492)

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

This would regress performance because we'd be using the standard
library's hash maps everywhere, so reverting for now.

Antonio Scandurra created

5c8073d Underline text if in dead key state (#7488)

Click to expand commit body
This highlights dead keys. Example: when in Brazilian keyboard layout
and typing `"` it's now underlined.



https://github.com/zed-industries/zed/assets/1185253/a6b65f7b-1007-473d-ab0f-5d658faa191b



Release Notes:

- Fixed dead keys not being underlined.

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

Thorsten Ball and Antonio created

db39b9d Add ability to bind to pane::RevealInProjectPanel (#7487)

Click to expand commit body
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>

Thorsten Ball and Antonio created

2aa8ccd fix: use OPEN_AI_API_URL (#7484)

Click to expand commit body
Release Notes:

- N/A

Todsaporn Banjerdkit created

e3ae7c4 linux: query window geometry for determining the surface extents

Dzmitry Malyshau created

eb23630 Use Fx* variants of HashMap and HashSet everywhere in Zed (#7481)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

7939673 Jetbrains keymap - Movement between panes (#7464)

Click to expand commit body
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>

James Gee created

d3562d4 Fixes for file-watching, user assets, and system dependencies (#2)

Click to expand commit body
* fix: avoid panics in case of non-existing path for watching

* fix: copy the themes and plugins

* Revert "add a few more libraries to the linux script"

This reverts commit 7509677003da3398d0df796eca9c5435a12f576e.

* fix: add vulkan validation layers to the system deps

* fix: fix the themes paths

Amin Yahyaabadi created

9fd2212 Go back to an alacritty release (#7474)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

3aa4e0c Fix Vim 'e' Behavior When Boundary Is Last Point on Line (#7424)

Click to expand commit body
This was originally just to fix
https://github.com/zed-industries/zed/issues/4354, which I did by just
returning the previous offset in `find_boundary`.. but `find_boundary`
is used in the "insert mode" / normal editor too, so returning the
previous boundary breaks existing functionality in that case.

I was considering a new `find_boundary` function just for some of the
vim motions like this, but I thought that this is straightforward enough
and future Vim functions might need similar logic too.

Release Notes:

- Fixed https://github.com/zed-industries/zed/issues/4354

Andrew Marek created

90cd3b5 Prevent terminal being a single column wide (#7471)

Click to expand commit body
Fixes: #2750
Fixes: #7457



Release Notes:

- Fixed a hang/panic that could happen rendering a double-width
character in a single-width terminal
([#2750](https://github.com/zed-industries/zed/issues/2750),
[#7457](https://github.com/zed-industries/zed/issues/7457)).

Conrad Irwin created

1264e36 Remove Default impl for ConnectionId (#7452)

Click to expand commit body
We noticed the following message in my logs when trying to debug some
lag when collaborating:

```
2024-02-06T09:42:09-08:00 [ERROR] error handling message. client_id:3, sender_id:Some(PeerId { owner_id: 327, id: 1123430 }), type:GetCompletions, error:no such connection: 0/0
```

That `0/0` looks like a bogus connection id, constructed via a derived
`Default`. We didn't ever find a code path that would *use* a default
`ConnectionId` and lead to this error, but it did seem like an
improvement to not have a `Default` for that type.

Release Notes:

- N/A

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

Max Brunsfeld and Marshall created