Commit Graph

18906 Commits

Author SHA1 Message Date
jansol
49144d94bf
gpui: Add support for window transparency & blur on macOS (#9610)
This PR adds support for transparent and blurred window backgrounds on
macOS.

Release Notes:

- Added support for transparent and blurred window backgrounds on macOS
([#5040](https://github.com/zed-industries/zed/issues/5040)).
- This requires themes to specify a new `background.appearance` key
("opaque", "transparent" or "blurred") and to include an alpha value in
colors that should be transparent.

<img width="913" alt="image"
src="https://github.com/zed-industries/zed/assets/2588851/7547ee2a-e376-4d55-9114-e6fc2f5110bc">
<img width="994" alt="image"
src="https://github.com/zed-industries/zed/assets/2588851/b36fbc14-6e4d-4140-9448-69cad803c45a">
<img width="1020" alt="image"
src="https://github.com/zed-industries/zed/assets/2588851/d70e2005-54fd-4991-a211-ed484ccf26ef">

---------

Co-authored-by: Luiz Marcondes <luizgustavodevergennes@gmail.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-03-29 11:10:47 -04:00
Piotr Osiewicz
1360dffead
task: Make UseSelectedQuery modal action expand to full command (#9947)
Previously it expanded to a label, which was correct for oneshots, but
wrong for everything else.

Release Notes:

- Improved UseSelectedQuery (shift-enter) action for tasks modal by
making it substitute a full command and not the task label.
- Fixed one-shot tasks having duplicates in tasks modal.
2024-03-29 11:45:50 +01:00
Kirill Bulatov
c7f04691d9
Query code actions and hovers from all related local language servers (#9943)
<img width="1122" alt="Screenshot 2024-03-28 at 21 51 18"
src="https://github.com/zed-industries/zed/assets/2690773/37ef7202-f10f-462f-a2fa-044b2d806191">


Part of https://github.com/zed-industries/zed/issues/7947 and
https://github.com/zed-industries/zed/issues/9912 that adds makes Zed
query all related language servers instead of the primary one.

Collab clients are still querying the primary one only, but this is
quite hard to solve, https://github.com/zed-industries/zed/pull/8634
drafts a part of it.
The local part is useful per se, as many people use Zed & Tailwind but
do not use collab features.

Unfortunately, eslint still returns empty actions list when queried, but
querying actions for all related language servers looks reasonable and
rare enough to be dangerous.

Release Notes:

- Added Tailwind CSS hover popovers for Zed in single player mode
([7947](https://github.com/zed-industries/zed/issues/7947))
2024-03-29 12:18:38 +02:00
Marshall Bowers
c4bc172850
Improve extension suggestions (#9941)
This PR improves the behavior for suggesting extensions.

Previously if the file had an extension, it would only look for
suggestions based on that extension. This prevented us from making
suggestions for files like `Cargo.lock`.

Suggestions are now made in the following order:

1. Check for any suggestions based on the entire file name
2. Check for any suggestions based on the file extension (if present)

This PR also fixes a bug where file name-based suggestions were looking
at the entire path, not just the file name.

Finally, the suggestion notification has been updated to include the ID
of the extension, to make it clearer which extension will be installed.

Release Notes:

- Improved extension suggestions.
2024-03-28 19:15:40 -04:00
Marshall Bowers
d074586fbf
Extract TOML support into an extension (#9940)
This PR extracts TOML support into an extension and removes the built-in
TOML support from Zed.

There's a small workaround necessary in order for us to set the file
permissions on the `taplo` binary so that it can be run. Eventually
we'll want to build this into the extension API, but for now we're just
hard-coding it on the host side.

Release Notes:

- Removed built-in support for TOML, in favor of making it available as
an extension. The TOML extension will be suggested for download when you
open a `.toml` or `Cargo.lock` file.
2024-03-28 18:40:12 -04:00
Marshall Bowers
90cf73b746
Update extension descriptions (#9939)
This PR updates the descriptions of some of the extensions to match the
others.

Release Notes:

- N/A
2024-03-28 17:14:55 -04:00
Marshall Bowers
0d7f5f49e6
Disable incompatible extension versions in extension view (#9938)
This PR makes it so extension versions that are incompatible with what
the current Zed instance supports are disabled in the UI, to prevent
attempting to install them.

Here's what it looks like in the extension version picker:

<img width="589" alt="Screenshot 2024-03-28 at 4 21 15 PM"
src="https://github.com/zed-industries/zed/assets/1486634/8ef11c72-c8f0-4de8-a73b-5c82e96f6bfe">

Release Notes:

- N/A
2024-03-28 16:49:26 -04:00
Max Brunsfeld
95fd426eff
Add auto-update system for extensions (#9890)
* [x] auto update extensions on startup
* [ ] add a manual way of updating all?
* [x] add a way to opt out of auto-updates for a particular extension

We don't believe that there should be any background polling for
extension auto-updates, because it could be disruptive to the user.

Release Notes:

- Added an auto-update system for extensions.

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-03-28 15:41:22 -04:00
Thorsten Ball
3a36b10e3a
Truncate commit messages in blame tooltip (#9937)
This truncates git commit messages to 15 lines.


Before:
![screenshot-2024-03-28-20 10
17@2x](https://github.com/zed-industries/zed/assets/1185253/03bea6bb-2ead-4bf6-bb12-22338c8745fd)

After:

![screenshot-2024-03-28-20 10
02@2x](https://github.com/zed-industries/zed/assets/1185253/0bd655ee-57ce-424f-b471-b7ce01e5fbf7)




Release Notes:

- N/A
2024-03-28 20:19:04 +01:00
Thorsten Ball
98adc7b108
Use correct font family and line_height in git blame sidebar (#9935)
This fixes the git blame sidebar looking wrong if the buffer font size
is higher than the UI font size (which is what was previously used).

It fixes this:

![screenshot-2024-03-28-19 46
48@2x](https://github.com/zed-industries/zed/assets/1185253/eca360ac-c8e8-41e0-85a1-52bdd05b9413)

To now look like this:

![screenshot-2024-03-28-19 47
42@2x](https://github.com/zed-industries/zed/assets/1185253/1fe93370-b7a2-44d4-a505-6368d72e2659)


Release Notes:

- N/A
2024-03-28 20:05:29 +01:00
Marshall Bowers
50fc54c321
Extend extension API to support auto-updating extensions (#9929)
This PR extends the extension API with some additional features to
support auto-updating extensions:

- The `GET /extensions` endpoint now accepts an optional `ids` parameter
that can be used to filter the results down to just the extensions with
the specified IDs.
- This should be a comma-delimited list of extension IDs (e.g.,
`wgsl,gleam,tokyo-night`).
- A new `GET /extensions/:extension_id` endpoint that returns all of the
extension versions for a particular extension.

Extracted from #9890, as these changes can be landed and deployed
independently.

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2024-03-28 14:20:57 -04:00
Maksim Bondarenkov
eaf65ab704
windows: Support compiling with MinGW toolchain (part 2) (#9843)
crates/languages and extensions/gleam: handle different target envs (a
new variant of os: `pc-windows-gnu`)
crates/storybook: compile manifest for all windows targets (same as
#9815)
looks like fixes #9807, but there are still errors presented

<details>

```
[2024-03-27T12:07:25+03:00 INFO  Zed] ========== starting zed ==========
[2024-03-27T12:07:26+03:00 INFO  cosmic_text::font::system] Parsed 398 font faces in 60ms.
[2024-03-27T12:07:26+03:00 INFO  db] Opening main db
[2024-03-27T12:07:26+03:00 ERROR util] crates\settings\src\settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-03-27T12:07:26+03:00 ERROR util] crates\settings\src\keymap_file.rs:89: invalid binding value for keystroke escape, context Some("ChatPanel > MessageEditor")

Caused by:
    no action type registered for chat_panel::CloseReplyPreview
[2024-03-27T12:07:26+03:00 INFO  gpui::platform::windows::platform] use DCompositionWaitForCompositorClock for vsync
[2024-03-27T12:07:26+03:00 ERROR util] crates\zed\src\zed.rs:629: EOF while parsing a value at line 1 column 0
[2024-03-27T12:07:26+03:00 ERROR util] crates\zed\src/main.rs:720: Системе не удается найти указанный путь. (os error 3)
[2024-03-27T12:07:26+03:00 INFO  db] Opening main db
[2024-03-27T12:07:26+03:00 INFO  node_runtime] Node runtime install_if_needed
[2024-03-27T12:07:26+03:00 ERROR util] crates\workspace\src/workspace.rs:912: Error in last_window, select_row_bound expected single row result but found none for: SELECT
  display,
  window_state,
  window_x,
  window_y,
  window_width,
  window_height,
  fullscreen
FROM
  workspaces
WHERE
  workspace_location IS NOT NULL
ORDER BY
  timestamp DESC
LIMIT
  1
[2024-03-27T12:07:26+03:00 INFO  blade_graphics::hal::init] Adapter "NVIDIA GeForce RTX 3050 Ti Laptop GPU"
[2024-03-27T12:07:26+03:00 INFO  blade_graphics::hal::init] Ray tracing is supported
[2024-03-27T12:07:27+03:00 WARN  blade_graphics::hal::init] Requested size 1x1 is outside of surface capabilities
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO  naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO  blade_graphics::hal::resource] Creating texture 0x2b2528fec20 of size 1024x1024x1 and format R8Unorm, name 'atlas', handle 0
[2024-03-27T12:07:27+03:00 INFO  blade_graphics::hal::resource] Creating buffer 0x2b2524762a0 of size 65536, name 'chunk-0', handle 1
[2024-03-27T12:07:27+03:00 INFO  blade_graphics::hal::resource] Creating buffer 0x2b252477ba0 of size 4096, name 'chunk-0', handle 2
[2024-03-27T12:07:27+03:00 INFO  blade_graphics::hal::resource] Creating buffer 0x2b2524765c0 of size 9184, name 'chunk-1', handle 3
[2024-03-27T12:07:27+03:00 ERROR util] crates\copilot_ui\src\copilot_completion_provider.rs:207: copilot is still starting
error: process didn't exit successfully: `target\release\Zed.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
fish: Job 1, 'RUST_BACKTRACE=full RUST_LOG=in…' terminated by signal SIGSEGV (Address boundary error)
```

</details>

Release Notes:

- N/A
2024-03-28 10:40:07 -07:00
Piotr Osiewicz
fcaf4383e9
editor: Preserve scroll position when jumping from multibuffer (#9921)
This is a best-effort attempt, as the target offset from the top is just
an estimate; furthermore, this does not account for things like project
search header (which adds a bit of vertical offset by itself and is
removed once we jump into a buffer), but it still should improve the
situation quite a bit.

Fixes: #5296

Release Notes:

- Improved target selection when jumping from multibuffer; final
position in the buffer should more closely match the original position
of the cursor in the multibuffer.
2024-03-28 18:33:57 +01:00
Thorsten Ball
7f54935324
Add git blame (#8889)
This adds a new action to the editor: `editor: toggle git blame`. When
used it turns on a sidebar containing `git blame` information for the
currently open buffer.

The git blame information is updated when the buffer changes. It handles
additions, deletions, modifications, changes to the underlying git data
(new commits, changed commits, ...), file saves. It also handles folding
and wrapping lines correctly.

When the user hovers over a commit, a tooltip displays information for
the commit that introduced the line. If the repository has a remote with
the name `origin` configured, then clicking on a blame entry opens the
permalink to the commit on the code host.

Users can right-click on a blame entry to get a context menu which
allows them to copy the SHA of the commit.

The feature also works on shared projects, e.g. when collaborating a
peer can request `git blame` data.

As of this PR, Zed now comes bundled with a `git` binary so that users
don't have to have `git` installed locally to use this feature.

### Screenshots

![screenshot-2024-03-28-13 57
43@2x](https://github.com/zed-industries/zed/assets/1185253/ee8ec55d-3b5e-4d63-a85a-852da914f5ba)

![screenshot-2024-03-28-14 01
23@2x](https://github.com/zed-industries/zed/assets/1185253/2ba8efd7-e887-4076-a87a-587a732b9e9a)
![screenshot-2024-03-28-14 01
32@2x](https://github.com/zed-industries/zed/assets/1185253/496f4a06-b189-4881-b427-2289ae6e6075)

### TODOs

- [x] Bundling `git` binary

### Release Notes

Release Notes:

- Added `editor: toggle git blame` command that toggles a sidebar with
git blame information for the current buffer.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-03-28 18:32:11 +01:00
Niklas Wimmer
e2d6b0deba
gpui: Update dependencies (second attempt) (#9836)
Updated version of #9741 with fixes for the problems raised in #9774. I
only verified that the images no longer look blueish on Linux, because I
don't have a Mac.

cc @osiewicz

Release Notes:

- N/A

---------

Signed-off-by: Niklas Wimmer <mail@nwimmer.me>
2024-03-28 10:22:31 -07:00
白山風露
94c51c6ac9
Windows: Enable clippy deny warnings (#9920)
~Waiting #9918~

Release Notes:

- N/A
2024-03-28 11:55:35 -04:00
Hans
659ea7054a
Adjust image viewer tab title font (#9903)
Fix #9895 

Release notes:

- Changed the tab title of the image preview to be the same as the other
tabs ([#9895](https://github.com/zed-industries/zed/issues/9895)).

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-03-28 11:44:15 -04:00
白山風露
403b912767
Windows: Implement signal in collab (#9918)
Only `CtrlC` and `CtrlBreak` signals are supported. `CtrlLogoff` and
`CtrlShutdown` is service only signal and I have not tried these yet.
`CtrlClose` occurs when terminal window is closed, but I found tokio's
`ctrl_close` does not work well, so I put comment in code.

Release Notes:

- N/A
2024-03-28 11:36:28 -04:00
Thorsten Ball
5da951ce29
Revert "Add working directories for eslint (#9738)" (#9914)
This reverts commit 96a1af7b0f from
https://github.com/zed-industries/zed/pull/9738 since it doesn't seem to
do anything. See:
https://github.com/zed-industries/zed/issues/9648#issuecomment-2025132087



Release Notes:

- N/A
2024-03-28 15:09:05 +01:00
Piotr Osiewicz
cb7c53bc52
workspace: Fix panel resize handles leaking through zoomed panels (#9909)
Fixes #9501 

Release Notes:

- Fixed panel resize handle "leaking through" into a zoomed panel or
pane.
2024-03-28 12:18:51 +01:00
Daniel Zhu
f5823f9942
Split DuplicateLine into DuplicateLineUp and DuplicateLineDown (#9715)
Fixes #9601

Release Notes:
- `DuplicateLine` is now split into `DuplicateLineUp` and
`DuplicateLineDown`
2024-03-28 12:52:08 +02:00
Antonio Scandurra
c33ee52046
Don't update active completion for editors that are not focused (#9904)
Release Notes:

- N/A
2024-03-28 10:51:55 +01:00
Hans
eaec04632a
vim: Fix t operand not working correctly when cursor is on tag (#9899)
Fix #8994 and #9844 

Release notes:
* Fixed the `t` object in Vim mode not working correctly when cursor was
on a tag. #9844 and #8994

This mr fixes the above two problems, for #9844, because our previous
logic is to only think that the minimum html tag containing the current
cursor is qualified, but the approach of nvim is to get the tag after
the current cursor first, followed by the tag around the current cursor,
so I modified the corresponding condition

For #8994, the situation is a bit more complicated, in our previous
implementation, we could only get the range of the object by a `cursor
position`, but there are two possible cases for the html tag:
When the current cursor length is 1, nvim will return the first tag
after the current cursor, as described above
When the current cursor length is greater than 1, nvim will return just
the smallest tag that can cover the current selection

So we may need to pass the current selection to the inside of the
method, and the point alone is not enough to support us in calculating
these conditions
2024-03-28 10:16:54 +01:00
Hans
96a1af7b0f
Add working directories for eslint (#9738)
Fix #9648 

Release notes:

- Added ability to configure ESLint's `workingDirectories` in settings.
Example:
`{"lsp":{"eslint":{"settings":{"workingDirectories":["./client","./server"]}}}}`.
#9648

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-03-28 07:01:19 +01:00
Hans
2f2f236afe
vim: Make cc and S auto-indent (#9731)
Fix #9612 

Release notes:

* Changed `cc` and `S` in Vim mode to only change the current line after
its indentation. #9612
2024-03-28 07:01:00 +01:00
Marshall Bowers
ff685b299d
Extract Zig support into an extension (#9893)
This PR extracts Zig support into an extension and removes the built-in
Zig support from Zed.

There's a small workaround necessary in order for us to set the file
permissions on the `zls` binary so that it can be run. Eventually we'll
want to build this into the extension API, but for now we're just
hard-coding it on the host side.

Release Notes:

- Removed built-in support for Zig, in favor of making it available as
an extension. The Zig extension will be suggested for download when you
open a `.zig` file.
2024-03-27 20:56:30 -04:00
Mikayla Maki
9bce5e8b82
Improve diagnostic header UI (#9888)
This PR rearranges the diagnostics to put the headers to the left of the
diagnostic messages and adds an additional button to close the
diagnostics.

<img width="394" alt="Screenshot 2024-03-27 at 2 01 19 PM"
src="https://github.com/zed-industries/zed/assets/2280405/83be4051-6441-47c6-9b48-77c75ce9c8eb">

<img width="326" alt="Screenshot 2024-03-27 at 2 01 56 PM"
src="https://github.com/zed-industries/zed/assets/2280405/d849ca34-91e9-4de6-9d9c-503b75e97d60">

As a drive by, I also quieted a useless but loud log message.

Release Notes:

- Added a close button to the `f8` diagnostics.
2024-03-27 14:30:27 -07:00
Kirill Bulatov
80242584e7
Prepare editor to display multiple LSP hover responses for the same place (#9868) 2024-03-27 20:49:26 +01:00
Kirill Bulatov
ce37885f49
Use different icons for terminal tasks (#9876) 2024-03-27 20:49:10 +01:00
Marshall Bowers
687d2a41d6
gleam: Bump to v0.0.2 (#9883)
This PR bumps the Gleam extension to v0.0.2.

Release Notes:

- N/A
2024-03-27 14:47:37 -04:00
Jason Wen
3046ef6471
windows: Prevent command line from opening in release mode (#9839)
Release Notes:

- Prevents the terminal from opening on release mode on Windows

Note: this also prevents Zed from logging to the terminal when it is
launched from the terminal. Is this expected behaviour on other
platforms?

---------

Co-authored-by: 白山風露 <shirayama.kazatsuyu@gmail.com>
2024-03-27 11:30:23 -07:00
Marshall Bowers
95699a07f4
gleam: Check for gleam on the PATH before installing the latest version (#9882)
This PR updates the Gleam extension to give priority to the `gleam`
binary that is already on the PATH before downloading/installing a
separate Gleam version.

Release Notes:

- N/A
2024-03-27 14:25:18 -04:00
Andrew Lygin
894b39a918
Add tab switcher (#7987)
The Tab Switcher implementation (#7653):
- `ctrl-tab` opens the Tab Switcher and moves selection to the
previously selcted tab. It also cycles selection forward.
- `ctrl-shift-tab` opens the Tab Switcher and moves selection to the
last tab in the list. It also cycles selection backward.
- Tab is selected and the Tab Switcher is closed on the shortcut
modifier key (`ctrl` by default) release.
- List items are in reverse activation history order.
- The list reacts to the item changes in background (new tab, tab
closed, tab title changed etc.)

Intentionally not in scope of this PR:
- File icons
- Close buttons

I will come back to these features. I think they need to be implemented
in separate PRs, and be synchronized with changes in how tabs are
rendered, to reuse the code as it's done in the current implementation.
The Tab Switcher looks usable even without them.

Known Issues:

Tab Switcher doesn't react to mouse click on a list item. It's not a tab
switcher specific problem, it looks like ctrl-clicks are not handled the
same way in Zed as cmd-clicks. For instance, menu items can be activated
with cmd-click, but don't react to ctrl-click. Since the Tab Switcher's
default keybinding is `ctrl-tab`, the user can only click an item with
`ctrl` pushed down, thus preventing `on_click()` from firing.

fixes #7653, #7321

Release Notes:

- Added Tab Switcher which is accessible via `ctrl-tab` and
`ctrl-shift-tab` (#7653) (#7321)

Related issues:

- Unblocks #7356, I hope 😄

How it looks and works (it's only `ctrl-tab`'s and `ctrl-shift-tab`'s,
no `enter`'s or mouse clicks):


https://github.com/zed-industries/zed/assets/2101250/4ad4ec6a-5314-481b-8b35-7ac85e43eb92

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-03-27 11:15:08 -07:00
Marshall Bowers
9c22009e7b
Look up extensions in the new index when reporting extension events (#9879)
This PR fixes a bug that was causing extension telemetry events to not
be reported.

We need to look up the extensions in the new index, as the extensions to
load won't be found in the old index.

Release Notes:

- N/A
2024-03-27 13:45:19 -04:00
Piotr Osiewicz
044b516d98
typescript: Highlight variables and enums in completions, add details (#9873)
This partially fixes #5287 by surfacing origin of a completion.

Before:

![image](https://github.com/zed-industries/zed/assets/24362066/7cae421d-9523-43c5-bfc3-eed613a21ac4)

After:

![image](https://github.com/zed-industries/zed/assets/24362066/3d5e360c-c496-4542-82b5-a22d5d00113d)

Release Notes:

- Improved typescript-language-server integration by surfacing more
information about completion items.
2024-03-27 17:55:22 +01:00
Marshall Bowers
b1ad60a2ef
Log when events are written to Clickhouse (#9875)
This PR adds some logging when we write events to Clickhouse in `POST
/telemetry/events`, for observability purposes.

Release Notes:

- N/A
2024-03-27 12:33:34 -04:00
Marshall Bowers
3f5f64a044
Wrap extension schema version in a newtype (#9872)
This PR wraps the extension schema version in a newtype, for some
additional type safety.

Release Notes:

- N/A
2024-03-27 12:11:12 -04:00
Joseph T. Lyons
8c56a4b305 v0.130.x dev 2024-03-27 10:53:09 -04:00
Dunqing
96b812b2c4
Pin Vue language server to 1.8 (#9846)
After `@vue/language-server` release 2.0, vue lsp doesn't work. I tried
to support 2.0, but since I'm not familiar with `@vue/language-server`
and `zed` I was unsuccessful. To avoid long-term unavailability, I
temporarily fixed the version to 1.8 until we have 2.0 support.

Release Notes:

- Pinned `@vue/language-server` to version `1.8` until Zed supports
`2.x`. ([#9388](https://github.com/zed-industries/zed/issues/9388) &
[#9329](https://github.com/zed-industries/zed/issues/9329)).

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-03-27 14:23:10 +01:00
Piotr Osiewicz
de4a54a204
chore: Bump ahash 0.7.6 (yanked) -> 0.7.8 (#9860)
Fixes #9855 

Release Notes:

- N/A
2024-03-27 13:51:58 +01:00
Kirill Bulatov
63f17c50b9
Fix mac bundling errors (#9848)
Based on
https://github.com/zed-industries/zed/pull/8952#issuecomment-2021693384
and
https://github.com/zed-industries/zed/pull/8952#issuecomment-2022241455

Fixes `./script/bundle-mac -l` workflow errors

* Use proper WebRTC.framework location path (without the arch name dir
in its path)

* Fix `./script/bundle-mac -l` behavior that unconditionally installed
the app and broke it on rerun.
Now the installation is done with `-i` flag only and always cleans up
the target dir (always using `-f` flag logic, hence removed it).


Release Notes:

- N/A
2024-03-27 13:04:32 +02:00
Conrad Irwin
140b8418c1
Stop reading deserialize_fingerprint (#9668)
Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-03-27 11:24:31 +01:00
Mikayla Maki
8583c3bd94
Add go to implementation shortcut (#9837)
This adds a keybinding for an existing action. Notably, our bindings for
`Go To Type Definition` and `Go To Implementation` are swapped from
VSCode. We use `cmd` and `shift`, they use `shift` and `cmd`.

Release Notes:

- Added a keybinding for `editor::GoToImplementation`
2024-03-26 17:04:55 -07:00
Mikayla Maki
40f60ebe2d
Fix the linux keymap (#9829)
Earlier versions where a simple find-replace of `cmd` => `ctrl`. In this
PR, I've gone over every keybinding individually and checked them.

Release Notes:

- Removed the `ShowContextMenu` action, it's only usage was in the
collab panel and it's been rebound to `SecondaryConfirm`
2024-03-26 16:10:09 -07:00
Marshall Bowers
3676ca879b
Extract Astro support into an extension (#9835)
This PR extracts Astro support into an extension and removes the
built-in Astro support from Zed.

Release Notes:

- Removed built-in support for Astro, in favor of making it available as
an extension. The Astro extension will be suggested for download when
you open a `.astro` file.
2024-03-26 18:50:08 -04:00
Marshall Bowers
7807f23e2a
Extract Dockerfile extension (#9832)
This PR extracts Dockerfile support into an extension and removes the
built-in Dockerfile support from Zed.

There's already an existing [Dockerfile
extension](https://github.com/d1y/dockerfile.zed) that was just missing
language server support. Language server support is being added to that
extension in https://github.com/d1y/dockerfile.zed/pull/2.

Release Notes:

- Removed built-in support for Dockerfile, in favor of making it
available as an extension. The Dockerfile extension will be suggested
for download when you open a `Dockerfile`.
2024-03-26 16:38:21 -04:00
Marshall Bowers
181dc86b48
Fix typo in PureScript extension's struct name (#9831)
This PR fixes a copy/paste typo in the name of the PureScript
extension's struct name.

Release Notes:

- N/A
2024-03-26 16:29:55 -04:00
Bennet Bo Fenner
e272acd1bc
collab ui: Fix notification windows on external monitors (#9817)
Sharing a project displays a notification (window) on every screen.
Previously there was an issue with the positioning of windows on all
screens except the primary screen.

As you can see here:


![image](https://github.com/zed-industries/zed/assets/53836821/314cf367-8c70-4e8e-bc4a-dcbb99cb4f71)

Now:


![image](https://github.com/zed-industries/zed/assets/53836821/42af9ef3-8af9-453a-ad95-147b5f9d90ba)

@mikayla-maki and I also decided to refactor the `WindowOptions` a bit. 
Previously you could specify bounds which controlled the positioning and
size of the window in the global coordinate space, while also providing
a display id (which screen to show the window on). This can lead to
unusual behavior because you could theoretically specify a global bound
which does not even belong to the display id which was provided.

Therefore we changed the api to this:
```rust
struct WindowOptions {
    /// The bounds of the window in screen coordinates
    /// None -> inherit, Some(bounds) -> set bounds.
    pub bounds: Option<Bounds<DevicePixels>>,

    /// The display to create the window on, if this is None,
    /// the window will be created on the main display
    pub display_id: Option<DisplayId>,
}
```

This lets you specify a display id, which maps to the screen where the
window should be created and bounds relative to the upper left of the
screen.

Release Notes:

- Fixed positioning of popup windows (e.g. when sharing a project) when
using multiple external displays.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-03-26 13:07:38 -07:00
Marshall Bowers
ffd698be14
Remove lingering uiua.rs file (#9828)
This PR removes a lingering file related to Uiua support.

This file was no longer being referenced after #9085, but just hadn't
been removed.

Release Notes:

- N/A
2024-03-26 16:07:23 -04:00
Remco Smits
0fd91652de
Fixed channel chat notifications are not working anymore (#9827)
This PR will fix the following issues that were introduced by the
following pull request #9557.

- Cannot create messages with a mention inside it
- Cannot invite a user
- Cannot accept an invitation

Release Notes:

- Fixed channel chat notifications are not working anymore.

Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
2024-03-26 20:25:09 +01:00