
Release Notes:
- Added syntax highlighting to code blocks in markdown preview
- Fixed scroll position in markdown preview when editing a markdown file
(#9208)
Bennet Bo Fenner
created
e5bd9f1
Fix prettier plugins does not seem to be picked up (#9193)
Click to expand commit body
This fixed the issue that prettier plugins were not picked up. The old
code would always send an empty array to the prettier plugin that
happens inside the `prettier_server.js`.
**Before**
The `options.plugins` key is an empty array, which is not correct.
```log
stderr: Resolved config: {"singleQuote":true,"trailingComma":"all","plugins":["prettier-plugin-organize-imports"]}, will format file '/Users/remcosmits/Documents/code/prettier-test/src/app/page.tsx' with options: {"singleQuote":true,"trailingComma":"all","plugins":[],"parser":"typescript","path":"/Users/remcosmits/Documents/code/prettier-test/src/app/page.tsx"}
```
https://github.com/zed-industries/zed/assets/62463826/52f2aad0-2f96-43a9-81ec-9d4630c495b2
**After**
The `options.plugins` contains the `prettier-plugin-organize-imports`
plugin as expected.
```log
stderr: Resolved config: {"singleQuote":true,"trailingComma":"all","plugins":["prettier-plugin-organize-imports"]}, will format file '/Users/remcosmits/Documents/code/prettier-test/src/app/page.tsx' with options: {"singleQuote":true,"trailingComma":"all","plugins":["prettier-plugin-organize-imports"],"parser":"typescript","path":"/Users/remcosmits/Documents/code/prettier-test/src/app/page.tsx"}
```
https://github.com/zed-industries/zed/assets/62463826/9045028d-aeca-4df1-819c-01905d83216c
Release Notes:
- Fixed send plugins correctly to the prettier plugin
([#8841](https://github.com/zed-industries/zed/issues/8841)).
Remco Smits
created
98cf494
Fix broken ESLint by pinning to `2.2.20-Insiders` release (#9215)
Click to expand commit body
This fixes #9213 by pinning ESLint to `2.2.20-Insiders` which is the
last known version to work well with Zed.
Once this fix is out, we can take a closer look at upgrading to 2.4.x or
even 3.x once that's out of prerelease.
Release Notes:
- Fixed ESLint integration being broken after Mar 7 2024 due to ESLint
3.0.1 alpha release being pushed.
([#9213](https://github.com/zed-industries/zed/issues/9213)).
Thorsten Ball
created
3be1402
Fix the double click and update the default settings (#9214)
Kirill Bulatov
created
44adb0a
Detect URLs at beginning and end of buffer as well (#9212)
Click to expand commit body
Release Notes:
- Fixed URL detection at very beginning and very end of buffer
([#9210](https://github.com/zed-industries/zed/issues/9210)).
| Before | After |
| ------ | ----- |
| 
| 
|
Ivan Žužak
created
14a0d80
ui: Center `Checkbox` within its container (#9201)
Click to expand commit body
This PR fixes an issue with the `Checkbox` component where the checkbox
wasn't being centered within its container element.
The problem can be seen when applying a background color to the
container element:
#### Before
<img width="439" alt="Screenshot 2024-03-11 at 5 44 10 PM"
src="https://github.com/zed-industries/zed/assets/1486634/11704b1a-3c3e-4250-99c3-973fb442287a">
#### After
<img width="447" alt="Screenshot 2024-03-11 at 5 45 59 PM"
src="https://github.com/zed-industries/zed/assets/1486634/569a850b-4bd7-4711-8327-bf426fa5d265">
This resulted in issues where, under certain conditions, the checkbox
could get cut off, as seen in #8868.
Centering the checkbox fixes this issue:
<img width="305" alt="Screenshot 2024-03-11 at 5 51 00 PM"
src="https://github.com/zed-industries/zed/assets/1486634/14e5642f-59ad-4288-bc25-ea7da2a008a7">
Fixes #8868.
Release Notes:
- Fixed a positioning issue with checkboxes
([#8868](https://github.com/zed-industries/zed/issues/8868)).
This PR insets the headers within `ContextMenu`s to give them some more
breathing room.
#### Before
<img width="347" alt="Screenshot 2024-03-11 at 4 13 31 PM"
src="https://github.com/zed-industries/zed/assets/1486634/73a56d68-d40e-4396-b584-f443197b69d6">
#### After
<img width="354" alt="Screenshot 2024-03-11 at 4 12 43 PM"
src="https://github.com/zed-industries/zed/assets/1486634/44c12a07-0784-4c94-b194-245f5cf94b2b">
Release Notes:
- Added padding to headers in context menus.
Marshall Bowers
created
02dcdd0
Open excerpt on double click in multibuffer by default. (#9196)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/5275
Double click with `alt` modifier pressed will do the regular word
selection.
Adds a setting to disable this behavior and instead select a word, as in
the regular buffer.
```
// What to do when multibuffer is double clicked in some of its excerpts
// (parts of singleton buffers).
// May take 2 values:
// 1. Behave as a regular buffer and select the whole word.
// "double_click_in_multibuffer": "select"
// 2. Open the excerpt clicked as a new buffer in the new tab (default).
// "double_click_in_multibuffer": "open",
// For the case of "open", regular selection behavior can be achieved by holding `alt` when double clicking.
"double_click_in_multibuffer": "open",
```
Release Notes:
- Made multibuffer to open excerpts in new tabs on double click by
default (changing settings or keeping alt restores the word selection
behavior). ([5275](https://github.com/zed-industries/zed/issues/5275))
Kirill Bulatov
created
25c471f
Render `+` separators for keybindings on non-macOS platforms (#9194)
Click to expand commit body
This PR adjusts the rendering of keybindings on non-macOS platforms to
have a `+` separator instead of just a blank space.
<img width="952" alt="Screenshot 2024-03-11 at 3 18 17 PM"
src="https://github.com/zed-industries/zed/assets/1486634/1573823d-4329-41f0-bef4-7a6c09f3e632">
<img width="584" alt="Screenshot 2024-03-11 at 3 16 25 PM"
src="https://github.com/zed-industries/zed/assets/1486634/aae41b22-dfde-40a6-9e0e-cee855522d3a">
Release Notes:
- N/A
Marshall Bowers
created
fe70a26
Fix relative glob patterns not working for language servers (#9179)
Click to expand commit body
If a language server would send us a glob pattern like `**/*.rb` or
`**/{package.json}` we'd end up ignoring it and never sending the
language server any notifications, because we try to `strip_prefix` the
projects absolute path from the pattern, BUT if that path is not in the
pattern, we'd return `None`.
This change fixes that.
Release Notes:
- Fixed language server glob patterns for file watching being ignored if
they were relative patterns.
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Remco <djsmits12@gmail.com>
Thorsten Ball
,
Bennet
, and
Remco
created
b2981f4
Fix completion-filtering by checking actual word boundaries & reduce Ruby word chars (#9170)
Click to expand commit body
This fixes https://github.com/zed-industries/zed/issues/9069 by
1. reverting https://github.com/zed-industries/zed/issues/7819
2. fixing completion filtering with regards to word boudaries
For (2) see explanation in commit message:
> Previously, this would only split words on upper-lower boundaries or
> on `_`/`-`.
>
> The result was that we would filter out completions too aggressively.
> The filter works by taking a suggested completion, say `foo_bar_lol`,
split
> it up into words - `foo`, `bar, `lol` - and check whether any of the
words
> start with the same characters as what the user already typed: `fo`,
or `bar`,
> ...
>
> In the case of Ruby, though, `:` wasn't considered a word boundary. If
the
> LSP would return `:foobar` when the user typed `:foo`, we'd check if
there are
> any completions that match `foo` (because that's the current word) but
> we'd compare against `foobar`, not `:` or `:foobar`.
>
> With this change, we get more match candidates and thus more
completions in Ruby.
With that we can do (1) because we don't need these characters as word
characters anymore to trigger completions.
Release Notes:
- Fixed word boundaries in Ruby by restoring old behavior (`@`, `:`, ...
are no longer considered word characters)
([#9069](https://github.com/zed-industries/zed/issues/9069))
- Fixed completions being filtered out when they happened at word
boundaries on special characters (e.g. `:`)
---------
Co-authored-by: Max <max@zed.dev>
Thorsten Ball
and
Max
created
f2aa183
ui: Extend `KeyBinding` with support for displaying keybindings for other platforms (#9192)
Click to expand commit body
This PR extends the `KeyBinding` component with support for displaying
keybindings for platforms other than macOS.
<img width="824" alt="Screenshot 2024-03-11 at 2 41 59 PM"
src="https://github.com/zed-industries/zed/assets/1486634/7108b17d-dfc3-42ee-9bfd-c58b334d7374">
Release Notes:
- N/A
Marshall Bowers
created
dfcc143
Rename 'project_core' crate to 'worktree', make it just about worktrees (#9189)
Click to expand commit body
This is just a refactor. I noticed that we now have a `project_core`
crate, which mainly contains the `Worktree` type and its private
helpers, plus the project's settings.
In this PR, I've renamed that crate to `worktree` and did some minor
simplification to its module structure. I also extracted a new
`WorktreeSettings` settings type from the `ProjectSettings`, so that the
worktree settings could live in the worktree crate. This way, the crate
is now exclusively about worktree logic.
Release Notes:
- N/A
Max Brunsfeld
created
2b67bb2
Occlude only modal and not the space around it used to center it
Antonio Scandurra
created
91a0923
Fix a few regressions related to the flicker fix (#9190)
Click to expand commit body
This pull request fixes
https://github.com/zed-industries/zed/issues/9187 and fixes also ix a
rendering problem that would show cursors on the same plane:

Release Notes:
- N/A
Antonio Scandurra
created
b4ddc83
Allow overriding font style and weight via experimental.theme_overrides in settings (#9122)
Click to expand commit body
Release Notes:
- Added support for overriding the current theme's syntax font styles
and weights in settings
([#9121](https://github.com/zed-industries/zed/issues/9121)).
| Before | After |
| ------ | ----- |
| 
| 
|
Ivan Žužak
created
3bd9d14
linux: Fix panic missing screen mode for crtc specified mode ID (#9106)
Click to expand commit body
Fix panic caused by missing screen mode for specified crtc mode id #9105
by searching over all crtcs instead of using the first one which may be
invalid.
Fixes #9089.
On linux, pressing shift and tab together can potentially produce
`ISO_Left_Tab`. This PR maps this key to "tab" with the shift modifier,
similar to `SHIFT_TAB_KEY` in gpui::platform::mac::events.
Note: The [default linux
keymaps](https://github.com/zed-industries/zed/blob/main/assets/keymaps/default-linux.json)
have shift-tab mapped to editor::TabPrev and ctrl-[ mapped to
editor::Outdent. Both actions appear to have the same effect.
Release Notes:
- Support shift-tab on linux (#9089).
Follow-up of https://github.com/zed-industries/zed/pull/9068
Release Notes:
- Fixed removal diff hunks not being displayed properly in the editor
Kirill Bulatov
created
f9f9f06
editor: Rearrange float operations in layout (#9176)
Click to expand commit body
We were seeing weird layouts with large files, where - starting with
some verylargelineindex - lines were rendered at weird y offsets. It
turned out that in some cases we're doing operations on Pixel values of
different magnitude, which then led to wrong results in calculations.
This commit addresses some of these problems, visible at glance when
working with large plaintext files. I *did not* dig into things like
inlay hints or diagnostics to see if they are subject to the same
potential precision loss.
Fixes #5371
Release Notes:
- Fixed editor layout for large files, where the lines might have been
laid out with incorrect Y offset from the top.
Release Notes:
- Fixed wayland cursor style handling
In upcoming Gnome 46, cursor icon names are considerably changing. For
example: this commit
https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/commit/74e9b79471236320d2af4925d6c5bb7df22380ce
removed/modified a lot of cursor names. Then some of the names were
reintroduced in this commit
https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/commit/6f64dc55dcaae24a14564494e24564a120cb4f33.
I also tried upcoming KDE Plasma 6. Some of the cursor names are not
used commonly between Gnome and KDE. From my analysis, these set of
cursor names should be more widely available in both previous and
upcoming release of Gnome and KDE.
Also, If a cursor style is not available, let's fallback to default
cursor style. This avoids scenarios where we get stuck with special
cursor styles like IBeam/Resize* because the current cursor style is not
available. This will lead to an unpleasant/broken experience. Falling
back to default cursor seems to be more acceptable.
Joel Selvaraj
created
f066dd2
Fix race when language server registers for `workspace/didChangeWatchedFiles` (#9177)
Click to expand commit body
This fixes #8896 by storing the `watched_paths` in a separate HashMap,
allowing us to handle the request even before we mark the language
server as running.
Downside is that we have yet another data structure for language
servers, but it also makes the `Running` enum case a bit smaller.
And it fixes the race condition.
Release Notes:
- Fixed language servers not being notified of file changes if language
server registers for file-notification right after starting up.
([#8896](https://github.com/zed-industries/zed/issues/8896)).
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Remco <djsmits12@gmail.com>
Thorsten Ball
,
Bennet
, and
Remco
created
0be20d0
fix: vulkan dependencies in `script/linux` (#9116)
Click to expand commit body
Just a quick pull request and a small fix, someone reported a dependency
was erroring for him, so I decided to open a small pull request. On top
of that, any `devel` header is not needed because Vulkan is only a
runtime dependency.
Release Notes:
- Fixed names of Vulkan dependencies that didn't exist
Mart Zielman
created
a04932c
Windows: fix crash with unhandled window (#9164)
Click to expand commit body
On Windows, some windows may be created that are not managed by the
application.
For example, the Japanese IME creates pop-ups like this one.
<img width="325" alt="image"
src="https://github.com/zed-industries/zed/assets/6465609/503aaa0a-7568-485a-a138-e689ae67001c">
The internal data associated with such a window is different from
`WindowsWindowInner` and will crash if referenced.
Therefore, before calling `try_get_window_inner`, it checks if it is an
owned window.
Release Notes:
- N/A
白山風露
created
ceadb39
Prevent text from wrapping in code actions menu (#9178)
Click to expand commit body
Right now we're basing the width of the menu on the longest code action
title. That is only an approximation and doesn't always coincide
perfectly with the true, longest code action.
Given that it's pretty close, however, this commit simply disables text
wrapping on the code action menu.
Release Notes:
- Fixed a rendering glitch that could cause code actions to not display
correctly ([#8341](https://github.com/zed-industries/zed/issues/8341))
Sorry I missed explicitly `Quad::pad` insertion at #9172.
The struct layout is unchanged and does not affect the behavior.
Release Notes:
- N/A
白山風露
created
a8fa1f7
chat: fix emoji completions when word consists of emojis (#9107)
Click to expand commit body
https://github.com/zed-industries/zed/assets/53836821/f4b31c47-d306-43f5-b971-0969f64a48f9
Fix for #9096 @JosephTLyons
Release Notes:
- Fixed emoji completion not showing up when word contains only emojis
(#9096)
830e107
Hide hover popover when mouse hovers over negative space (#9173)
Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/8340
Release Notes:
- Fixed a bug that would cause hover information to not be dismissed
when hovering over negative space.
This commit also specializes 'fn push' for large text quantities. That specialized version uses a Vec instead of SmallVec.
This commit shaves off about ~100ms out of 800ms when loading a 600Mb text buffer.
Piotr Osiewicz
created
298314d
Fix regressions introduced by flicker fix (#9162)
Click to expand commit body
This pull request fixes a couple of easy regressions we discovered right
after using #9012 on nightly:
- Popover buttons for a chat message were being occluded by the message
itself.
- Scrolling was not working on the `List` element.
Release Notes:
- N/A
Antonio Scandurra
created
2f6c78b
Fix incorrect outline selections after submit (#9160)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/9153
Release Notes:
- N/A
See https://zed.dev/channel/gpui-536
Fixes https://github.com/zed-industries/zed/issues/9010
Fixes https://github.com/zed-industries/zed/issues/8883
Fixes https://github.com/zed-industries/zed/issues/8640
Fixes https://github.com/zed-industries/zed/issues/8598
Fixes https://github.com/zed-industries/zed/issues/8579
Fixes https://github.com/zed-industries/zed/issues/8363
Fixes https://github.com/zed-industries/zed/issues/8207
### Problem
After transitioning Zed to GPUI 2, we started noticing that interacting
with the mouse on many UI elements would lead to a pretty annoying
flicker. The main issue with the old approach was that hover state was
calculated based on the previous frame. That is, when computing whether
a given element was hovered in the current frame, we would use
information about the same element in the previous frame.
However, inspecting the previous frame tells us very little about what
should be hovered in the current frame, as elements in the current frame
may have changed significantly.
### Solution
This pull request's main contribution is the introduction of a new
`after_layout` phase when redrawing the window. The key idea is that
we'll give every element a chance to register a hitbox (see
`ElementContext::insert_hitbox`) before painting anything. Then, during
the `paint` phase, elements can determine whether they're the topmost
and draw their hover state accordingly.
We are also removing the ability to give an arbitrary z-index to
elements. Instead, we will follow the much simpler painter's algorithm.
That is, an element that gets painted after will be drawn on top of an
element that got painted earlier. Elements can still escape their
current "stacking context" by using the new `ElementContext::defer_draw`
method (see `Overlay` for an example). Elements drawn using this method
will still be logically considered as being children of their original
parent (for keybinding, focus and cache invalidation purposes) but their
layout and paint passes will be deferred until the currently-drawn
element is done.
With these changes we also reworked geometry batching within the
`Scene`. The new approach uses an AABB tree to determine geometry
occlusion, which allows the GPU to render non-overlapping geometry in
parallel.
### Performance
Performance is slightly better than on `main` even though this new
approach is more correct and we're maintaining an extra data structure
(the AABB tree).

Release Notes:
- Fixed a bug that was causing popovers to flicker.
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
Antonio Scandurra
,
Nathan Sobo
, and
Thorsten
created
9afd78b
Add ESLint information to JavaScript docs (#9158)
I'm using Yarn Plug'n'Play.
In this case, by default, eslint cannot find the path, so configuration
like `"eslint.nodePath": ".yarn/sdks"` is required.
So, I want to add this!
Release Notes:
- Added eslint config nodePath
41dc5fc
Allow highlighting editor rows from multiple sources concurrently (#9153)
Kirill Bulatov
created
f4a86e6
Always single-quote directory when cd'ing to get shell env (#9145)
Click to expand commit body
This avoids us potentially executing code (if someone were to name their
directory `$(echo you-are-pwned > /secure-files)`, for example).
Works with zsh, bash, fish, nushell. Tested locally with all of them.
Release Notes:
- N/A
Prepare for git diff hunk highlights by grouping all inlay highlight
properties into one struct, and removing the dead background highlight
code.
Release Notes:
- N/A
a03feca
Remove feedback button from status bar (#9100)
Click to expand commit body
This PR removes the feedback button from the status bar, as Nathan and I
discussed. We discussed the fact that we likely no longer need to take
up valuable screen real estate for this, with where Zed as at now.
This PR also moves the `Share Feedback...` collab menu item to the
`Help` menu, as that's where VS Code puts their action to send in-app
feedback (which might help with future discoverability) and renames it
to `Give Feedback...`, to make it consistent with the name of the
command palette action.
Release Notes:
- Removed the feedback button from the status bar.
Joseph T. Lyons
created
ca696fd
Add rs-notify implementation of `fs::watch` (#9040)
Click to expand commit body
This PR simplifies the Zed file system abstraction and implements
`Fs::watch` for linux and windows.
TODO:
- [x] Figure out why this fails to initialize the file watchers when we
have to initialize the config directory paths, but succeeds on
subsequent runs.
- [x] Fix macOS dependencies on old fsevents::Event crate
Release Notes:
- N/A
Mikayla Maki
created
456efb5
windows: Add file dialog using IFileOpenDialog (#8919)
Click to expand commit body
Release Notes:
- Added a file dialog for Windows
Jason Wen
created
d4ec78f
Add strikethrough to deprecated methods in CompletionsMenu (#9086)
Click to expand commit body
Release Notes:
- Added ([#8390](https://github.com/zed-industries/zed/issues/8390)).
- Also Grays out deprecated methods
Before
<img width="730" alt="image"
src="https://github.com/zed-industries/zed/assets/71665039/8b5e8009-22c2-43f7-b85b-79e571a5d282">
After
<img width="773" alt="image"
src="https://github.com/zed-industries/zed/assets/71665039/0aff572b-6d3f-4ed9-b08b-d925ee650817">
146971f
Splice remove suggesion hints when those are cleared in the editor. (#9088)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/6793
Release Notes:
- Fixed copilot suggestions not disappearing after disabling the tool
([6793](https://github.com/zed-industries/zed/issues/6793))