Commit log

4003abc zed 0.127.5

Thorsten Ball created

df2d025 Update to vscode-eslint 2.4.4 & support flat config file extensions (#9708)

Click to expand commit body
This upgrades to vscode-eslint 2.4.4 to support flat configs, in
multiple configuration files, ending in `.js`, `.cjs`, `.mjs`.

We changed the code to not use the GitHub release because we actually
don't need the artifacts of the release, we just need the source code,
which we compile anyway.

Fixes #7271.

Release Notes:

- Added support for ESLint flat config files.
([#7271](https://github.com/zed-industries/zed/issues/7271)).

Co-authored-by: Kristján Oddsson <koddsson@gmail.com>

Thorsten Ball and Kristján Oddsson created

9446b04 Fix `prettier-plugin-organize-imports` plugin removes used imports (#9598)

Click to expand commit body
So this pull request fixes an issue that was driven me crazy. The issue
was that when you use the `prettier-plugin-organize-imports` It would
remove some imports that should not be removed before they were used
inside the module itself.

You can reproduce it with the following `prettierrc.json` config and
source code. When you **save** the file, it would remove the `import
clsx from "clsx";` import from the file.

**Prettier config**
```json
{
  "semi": true,
  "tabWidth": 4,
  "trailingComma": "es5",
  "useTabs": true,
  "plugins": [
    "prettier-plugin-tailwindcss",
    "prettier-plugin-organize-imports"
  ]
}
```

**Source code**
```typescript
import clsx from "clsx";

export default function Home() {
  return (
      <main>
	      {clsx("asdjklasdjlkasd", "asdjlkasjdjlk")}
      </main>
  );
}
```

After a deep dive with @mrnugget, I was debugging deep down the prettier
plugin system and found the issue that was causing this issue. When I
was looking inside the
`node_modules/prettier-plugin-organize-imports/lib/organize.js`. I saw
the following code that looked strange to me because it falls back to
`file.ts` if `filepath` is not passed through inside the prettier config
options.

<img width="860" alt="Screenshot 2024-03-20 at 21 31 46"
src="https://github.com/zed-industries/zed/assets/62463826/47177fe5-e5a9-41d8-9f2f-0304b2c2159f">

So the issue was small, if you look at the following code, the `path`
key should be `filepath` inside the
`crates/prettier/src/prettier_server.js:205`
![Screenshot 2024-03-20 at 21 35
25](https://github.com/zed-industries/zed/assets/62463826/1eea0a88-c886-4632-9c69-9f3095126971)

Release Notes:

- Fixed prettier integration not using the correct filepath when
invoking prettier, which could lead to some prettier plugins failing to
format correctly.
([#9496](https://github.com/zed-industries/zed/issues/9496)).

Remco Smits created

e19b30e zed 0.127.4

Mikayla created

96ac5b4 Fix copilot modal (#9613)

Click to expand commit body
Release Notes:

- Fixed copilot modal not responding
([#9596](https://github.com/zed-industries/zed/issues/9596)). (preview
only)

Conrad Irwin created

b6bf36b chat panel: Fix tooltips not working for links (cherry-pick #9691) (#9698)

Click to expand commit body
Cherry-picked chat panel: Fix tooltips not working for links (#9691)

Closes #9418 

Noticed a difference in the `cx.set_tooltip(...)` calls between `div`
and `InteractiveText`. `div` calls `cx.set_tooltip(...)` inside
`after_layout`, but `InteractiveText` was calling this inside `paint`. I
believe as #9012 was merged, we need to call `cx.set_tooltip` inside
`after_layout`, as inserting inside `paint` does not seem to be
supported anymore.

I moved the code for setting the tooltip to `after_layout` and hovering
over links inside the chat seems to bring up the tooltips again.

Before:

See https://github.com/zed-industries/zed/issues/9418#issue-2189398784

After:



![image](https://github.com/zed-industries/zed/assets/53836821/a623164c-1ce0-40d7-bc53-020f176fba4a)


Release Notes:

- Fixed tooltip not showing up when hovering over links inside the chat
panel ([#9418](https://github.com/zed-industries/zed/issues/9418))

Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>

gcp-cherry-pick-bot[bot] and Bennet Bo Fenner created

7a704e5 v0.127.x stable

Mikayla created

59d86e6 Insert hitbox if div contains tooltip (cherry-pick #9545) (#9546)

Click to expand commit body
Cherry-picked Insert hitbox if div contains tooltip (#9545)

Release Notes:

- Fixed a bug that would cause certain tooltips to not show up
(preview-only).

Co-authored-by: Antonio Scandurra <me@as-cii.com>

gcp-cherry-pick-bot[bot] and Antonio Scandurra created

8a7c340 zed 0.127.3

Conrad Irwin created

c3908b1 Upgrade Tree-sitter to handle high memory usage and memory errors in wasm parsers (cherry-pick #9518) (#9520)

Click to expand commit body
Cherry-picked Upgrade Tree-sitter to handle high memory usage and memory
errors in wasm parsers (#9518)

Fixes #8528

Release Notes:

- Fixed a crash that could occur when editing certain SQL files.
- Fixed a general class of crashes that could occur due to bugs in
grammars added via extensions.

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

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>

gcp-cherry-pick-bot[bot] , Max Brunsfeld , and Marshall created

cfdbfa9 Fix segfault in "install:cli" when app is not yet installed (cherry-pick #9427) (#9431)

Click to expand commit body
Cherry-picked Fix segfault in "install:cli" when app is not yet
installed (#9427)

Release Notes:

- Fixed a panic running `cli: Install` or `cli: Register Zed Scheme`
before installing the app.

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

gcp-cherry-pick-bot[bot] and Conrad Irwin created

1951f16 Fix panic loading language queries (#9506)

Click to expand commit body
Release Notes:

- Fixed a panic when loading a language with queries but no grammar

Conrad Irwin created

e6800bc Don't panic on missing mtime (cherry-pick #9513) (#9514)

Click to expand commit body
Cherry-picked Don't panic on missing mtime (#9513)

This is expected as of zed 0.128 when a new unsaved file is created

Release Notes:

- Fixed a panic when collaborating with newer zed versions

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

gcp-cherry-pick-bot[bot] and Conrad Irwin created

a24b8f2 zed 0.127.2

Antonio Scandurra created

642fd36 Fix dispatching global actions from a window (cherry-pick #9502) (#9504)

Click to expand commit body
Cherry-picked Fix dispatching global actions from a window (#9502)

Fixes https://github.com/zed-industries/zed/issues/9313

Release Notes:

- Fixed a regression that caused global actions to stop working when
invoked from a window (preview-only)
([#9313](https://github.com/zed-industries/zed/issues/9313)).

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

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Conrad <conrad@zed.dev>

gcp-cherry-pick-bot[bot] , Antonio Scandurra , and Conrad created

743760b Automatically create a hitbox for focusable elements (cherry-pick #9485) (#9486)

Click to expand commit body
Cherry-picked Automatically create a hitbox for focusable elements
(#9485)

Closes #9462

This fixes the focus story in the storybook.

Release Notes:

- N/A

Co-authored-by: Antonio Scandurra <me@as-cii.com>

gcp-cherry-pick-bot[bot] and Antonio Scandurra created

2db783a Fix flickering when interacting with the language server logs (cherry-pick #9390) (#9435)

Click to expand commit body
Cherry-picked Fix flickering when interacting with the language server
logs (#9390)

Fixes https://github.com/zed-industries/zed/issues/9340

The flickering was caused by the pane trying to restore focus on a
`FocusHandle` that wasn't being rendered anymore. This commit uses the
new `WeakFocusHandle` to avoid retaining a reference to focus handles
that don't exist anymore.

Release Notes:

- Fixed a bug that caused flickering when interacting with the language
server logs
([#9340](https://github.com/zed-industries/zed/issues/9340)).

Co-authored-by: Antonio Scandurra <me@as-cii.com>

gcp-cherry-pick-bot[bot] and Antonio Scandurra created

597858e zed 0.127.1

Antonio Scandurra created

327879e Fix double-clicking titlebar to zoom (cherry-pick #9323) (#9327)

Click to expand commit body
Cherry-picked Fix double-clicking titlebar to zoom (#9323)

Fixes https://github.com/zed-industries/zed/issues/9300

This was a regression caused by not inserting a hitbox when a div only
had click listeners on it.

Release Notes:

- Fixed a regression that disabled double-clicking on the titlebar to
zoom the window.
([#9300](https://github.com/zed-industries/zed/issues/9300))
(preview-only)

Co-authored-by: Antonio Scandurra <me@as-cii.com>

gcp-cherry-pick-bot[bot] and Antonio Scandurra created

c1b4f3d Fix accidental leak of text stack between frames (cherry-pick #9297) (#9324)

Click to expand commit body
Cherry-picked Fix accidental leak of text stack between frames (#9297)

Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: Marshall <marshall@zed.dev>

Release Notes:

- Fixed a bug where text styles could leak between frames (preview only)

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

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

gcp-cherry-pick-bot[bot] , Conrad Irwin , Max , and Marshall created

5bc4c42 Automatically reset cursor style when hit test changes (cherry-pick #9289) (#9322)

Click to expand commit body
Cherry-picked Automatically reset cursor style when hit test changes
(#9289)

Release Notes:

- N/A

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

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>

gcp-cherry-pick-bot[bot] , Antonio Scandurra , and Nathan Sobo created

ced690d v0.127.x preview

Joseph T. Lyons created

6286d86 Set the correct dispatch action for the double-click handler for the pane tab bar (#9221)

Click to expand commit body
Fixes #9003

Release Notes:

- Fixed the double-click action on the terminal tab bar opening a new
buffer instead of a new terminal
([#9003](https://github.com/zed-industries/zed/issues/9003)).

Igal Tabachnik created

fc9f844 Always stop propagation in div's scroll wheel listener (#9282)

Click to expand commit body
Fixes #9274

This fixes a bug that was preventing the editor hover popovers from
being scrolled with the trackpad.

Release Notes:

- N/A

Antonio Scandurra created

1094827 Omit `.git` worktree indexing (#9281)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/9174

Release Notes:

- Fixed panics when `.git` was opened as a Zed worktree
([9174](https://github.com/zed-industries/zed/issues/9174))

Kirill Bulatov created

572ba3f Fall back to FindAllReferences if cmd-click did not preform GoToDefinition elsewhere (#9243)

Kirill Bulatov created

427d669 gpui: Do not emit MouseUpEvent when exiting drag & drop (#9273)

Click to expand commit body
Fixes #9198

Release Notes:

- Fixed a bug where empty panes could be created during drag & drop.

Piotr Osiewicz created

ac4bbb6 Correctly re-render mouse cursor when hovering over pane group divider (#9270)

Click to expand commit body
Before this change, the hitbox felt one-sided because the cursor didn't
consistently change into the drag-handle cursor.

The reason was that we didn't trigger a redraw on hover, so we'd only
change the cursor if we detected hover AND something else caused a
redraw.

Release Notes:

- Fixed the pane resize handler not consistently triggering on mouse
hover.

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

Thorsten Ball and Antonio created

754df93 Fix segfault when dropping MacWindow (#9267)

Click to expand commit body
This avoids calling `window.setDelegate(nil)` when the window was
already closed.

Release Notes:

- Fixed a segfault that could show up when closing windows.

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

Thorsten Ball and Antonio created

3c28282 Redraw when toggling between windows (#9236)

Click to expand commit body
Before this change we didn't consistently trigger focus events when
toggling between with windows `Cmd-backtick`. We only triggered them
when the OS decided to trigger a redraw.

That lead to a nasty bug that showed up in Vim mode where a cursor would
still be active in the hidden window, even though it was deactivated.

One then had to manually try to trigger a focus event in the new window
to activate the cursor.

With this change, we call `cx.refresh` when the window activation status
changed which triggers focus events consistently and fixes this bug.

With logging we can observe this:

**BEFORE**:


https://github.com/zed-industries/zed/assets/1185253/e1ad8878-129c-44ba-9d8b-c720f9dca5b6


**AFTER**:


https://github.com/zed-industries/zed/assets/1185253/733fdadb-d1ea-47fe-a2c1-7b50af299cc0


Release Notes:

- Fixed focus not being consistently changed when switching between
multiple Zed windows via `Cmd-backtick`.

---------

Co-authored-by: Manu Raj <git@manuraj.dev>
Co-authored-by: Antonio <antonio@zed.dev>

Thorsten Ball , Manu Raj , and Antonio created

80b80df gpui: Switch to `x11rb` (#9113)

Click to expand commit body
Switch to using `x11rb` crate instead of current `xcb` crate for gpui's
x11 platform.

Also fixes the crash on resize, and white flashing on resize.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>

Rajesh Malviya and Mikayla Maki created

47afc70 Update Lua config.toml (#9260)

Click to expand commit body
Release Notes:

- Added autoclosing of `(` and `'` in Lua.

Joseph T. Lyons created

646f695 Allow opening non-extant files (#9256)

Click to expand commit body
Fixes #7400



Release Notes:

- Improved the `zed` command to not create files until you save them in
the editor ([#7400](https://github.com/zed-industries/zed/issues/7400)).

Conrad Irwin created

e792c1a Open new windows with a default size and position (#9204)

Click to expand commit body
This PR changes GPUI to open windows with a default size and location,
and to otherwise inherit from their spawning window.

Note: The linux build now crashes on startup.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Ezekiel Warren <zaucy@users.noreply.github.com>

Mikayla Maki , Nathan , and Ezekiel Warren created

9a2dcee windows: Support dropping targets with filenames longer than 260 characters (#9115)

Click to expand commit body
use `Vec` instead of slice to support dynamic filename length.

Release Notes:
- N/A

张小白 created

fb83cf2 notification panel: rework time formatting (#8997)

Click to expand commit body
Follow up of #7994 to rework the notification panel timestamps.
This PR also includes some of the changes @evrsen proposed in #8996 
Here is what it looks like now:


https://github.com/zed-industries/zed/assets/53836821/d85450e7-eab6-4fe7-bd11-1d76c0e87258

Release Notes:
- Reworked date time formatting in the chat and the notification panel
- Added hover style to notifications and hovering tooltip on timestamps

---------

Co-authored-by: Evren Sen <146845123+evrsen@users.noreply.github.com>

Bennet Bo Fenner and Evren Sen created

a105b5f Wayland: Remove bogus `wl_surface::commit`s on resize (with integer scaling) (#9245)

Click to expand commit body
Release Notes:
- N/A

This prevents a crash on sway (on older versions without fractional
scaling). This means the resize is delayed until the next this we
present a frame, we need to investigate if this is the correct this to
do.

bbb651 created

aeb2a98 chore: Move new util deps to workspace level (#9250)

Click to expand commit body
I've missed a comment from @maxdeviant on #9247 before hitting merge;
mea culpa

Release Notes:

- N/A

Piotr Osiewicz created

34f09ba chore: Clean up util dependencies. (#9247)

Click to expand commit body
This allows this crate to start building sooner + it reduces our total
build graph size by 13 units (1104 -> 1091).

Release Notes:

- N.A

Piotr Osiewicz created

c09fe1c Do not allow concurrent FindAllReferences requests for the same multibuffer anchors (#9242)

Click to expand commit body
FindAllReferences LSP requests might take a long time to complete, and
currently Zed allows multiple requests spawned concurrently for the same
Anchor in the multi buffer. That results in multiple search results'
multi buffers appearing, sometimes at once, which is not what we want.

Part of https://github.com/zed-industries/zed/issues/5351 that helps to
reduce the amount of search results after clicks that did not resolve
instantly.


Release Notes:

- Improved FindAllReferences action by not allowing concurrent requests
for the same multi buffer source

Kirill Bulatov created

64219ba When fetching extensions from blob store, don't halt on invalid extensions. (#9241)

Click to expand commit body
This fixes an error where we were failing to sync extensions from the
blob store because of the presence of one invalid extensions
(`gentle-dark`), which was missing the `authors` field in its manifest.

Release Notes:

- N/A

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

Max Brunsfeld and Marshall created

05dfe96 Add --add/--new to control CLI behaviour (#9202)

Click to expand commit body
When neither is specified, if you open a directory you get a new
workspace, otherwise files are added to your existing workspace.

With --new files are always opened in a new workspace
With --add directories are always added to an existing workspace

Fixes #9076
Fixes #4861
Fixes #5370

Release Notes:

- Added `-n/--new` and `-a/--add` to the zed CLI. When neither is
specified, if you open a directory you get a new workspace, otherwise
files are added to your existing workspace. With `--new` files are
always opened in a new workspace, with `--add` directories are always
added to an existing workspace.
([#9076](https://github.com/zed-industries/zed/issues/9096),
[#4861](https://github.com/zed-industries/zed/issues/4861),
[#5370](https://github.com/zed-industries/zed/issues/5370)).

Conrad Irwin created

89c67fb Fix typos in default `settings.json` (#9239)

Click to expand commit body
This PR fixes some typos in the comments within the default
`settings.json` file.

Fixes #4257.

Release Notes:

- Fixed some incorrect comments in the default `settings.json` file
([#4257](https://github.com/zed-industries/zed/issues/4257)).

Marshall Bowers created

41d8ba1 Remove wezterm fork from dependencie (#8998)

Click to expand commit body
Improves build time by removing wezterm dependency
([#8604](https://github.com/zed-industries/zed/issues/8604)).

Release Notes:

- N/A

dalton-oliveira created

e7289c3 Correctly show the `shift` icon for keybindings on macOS (#9235)

Click to expand commit body
Release Notes:

- N/A

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

Antonio Scandurra and Nathan created

ece0fb5 Rosé Pine: Change `#f5c177` to `#f6c177` (#9232)

Click to expand commit body
As discussed in #themes-and-ui

Release Notes:

- N/A

Kainoa Kanter created

8c87b34 Show formatting failure (#9229)

Click to expand commit body
This fixes #8072 and #9061 by surfacing formatting errors in the
activity indicator.

It shows a message in the activity indicator if the last attempt
to format a buffer failed.

It only keeps track of the last attempt, so any further formatting
that succeeds will reset or update the error message.

I chose to only keep track of that, because everything else (keeping
track of formatting state per buffer, per project, per worktree) seems
complicated with little benefit, since we'd have to keep track of that
state, update it, clean it, etc.

We can still do that should we decide that we need to keep track
of the state on a per-buffer basis, but I think for now this is a
good, simple solution.

This also changes the `OpenLog` action to scroll to the end of the
buffer
and to not mark the buffer as dirty.


Release Notes:

- Added message to activity indicator if last attempt to format a buffer
failed. Message will get reset when next formatting succeeds. Clicking
on message opens log with more information.
([#8072](https://github.com/zed-industries/zed/issues/8072) and
[#9061](https://github.com/zed-industries/zed/issues/9061)).
- Changed `zed: Open Log` action to not mark the opened log file as
dirty and to always scroll to the bottom of the log.


https://github.com/zed-industries/zed/assets/1185253/951fb9ac-8b8b-483a-a46d-712e52878a4d

Thorsten Ball created

39a0841 Center dock resize handle hitboxes (#9225)

Click to expand commit body
Also, add a `deferred` function which takes an element to paint after
the current element tree.

Release Notes:

- Improved the size and position of the hitbox for resizing left, right,
and bottom panels.
([#8855](https://github.com/zed-industries/zed/issues/8855))

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

Antonio Scandurra , Julia , and Nathan created

409aa51 Fix mouse interactions with the project and branch switchers (#9222)

Click to expand commit body
Previously, we were considering the mouse to be "out" of a div when its
hitbox wasn't hovered. However, if a parent listened for
"mouse_down_out" and a child occluded the parent, the parent would
always think the mouse was out even when the user clicked the child.

This commit changes the definition of "mouse out" to simply mean "does
not contain the point", without accounting for occlusion.

Release Notes:

- N/A

Co-authored-by: Julia <julia@zed.dev>

Antonio Scandurra and Julia created

d5796dc Show only prefix/suffix if there are more than 12 breadcrumbs (#9220)

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

This should fix the arena panic we were observing. I saw that breadcrumb
rendering was on the stack trace for some of the panics, so my suspicion
is that it's being caused by some people navigating into deeply nested
files.

Release Notes:

- Fixed a panic that could occur when displaying too many breadcrumbs.
([#9079](https://github.com/zed-industries/zed/issues/9079))

Antonio Scandurra created