eecbafb
Add JSDoc syntax highlighting support (#7826)
Click to expand commit body

Closes #4926
Release Notes:
- Added support for [JSDoc](https://jsdoc.app) syntax highlighting
([#7224](https://github.com/zed-industries/zed/issues/7224)).
Robin Pfäffle
created
24e7cfb
Fix `hex_to_hsla` inside the color crate (#9412)
Click to expand commit body
Previously, when `hex_to_hsla` was called with a color string using the
#rgb format, the expansion
did not add alpha values, leading to an incorrect result. This patch
fixes the issue.
In addition to that, parsing has been reworked, and the new function no
longer makes
calls to the global allocator in addition to generation much smaller
code. Parsing should
therefore be a bit more performant.
This PR continues the refinements to the `TitleBar` component.
Here are the notable changes:
- `KeyBindingDisplay` and `PlatformStyle` have been unified into a
single `PlatformStyle`.
- This provides us a consistent way for adapting UI to different
platform styles.
- `PlatformTitlebar` has been renamed to `TitleBar`.
- The `Platform` prefix was irrelevant.
- The Windows window controls have been factored out into a separate
module and have been componentized.
<img width="1283" alt="Screenshot 2024-03-15 at 3 34 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/07da391f-828b-48bf-8849-58863f4ccce7">
> I'm missing the Segoe Fluent Icons font, so that's why the aren't
rendering properly.
Release Notes:
- N/A
Marshall Bowers
created
dd33330
Finish migration to role instead of `is_admin` (#9414)
Click to expand commit body
Release Notes:
- Fixed a bug signing in for five users
([#4323](https://github.com/zed-industries/zed/issues/4323)).
Conrad Irwin
created
123d3ee
ui: Clean up `PlatformTitlebar` implementation (#9413)
Click to expand commit body
This PR cleans up the implementation of the `PlatformTitlebar` component
to better match our conventions for building UI components.
Release Notes:
- N/A
Marshall Bowers
created
db43479
windows: active window implementation (#9314)
Click to expand commit body
active window implementation - bonus vim mode works on windows now
Release Notes:
- N/A
This PR reverts https://github.com/zed-industries/zed/pull/9392 and
fixes the regressions that led to the reversion.
Release Notes:
- N/A
---------
Co-authored-by: Ezekiel Warren <ezekiel@seaube.com>
Mikayla Maki
and
Ezekiel Warren
created
44ac6ca
ci: fix-up upload path in upload-nightly for aarch64 (#9409)
Release Notes:
- Added [object-fit
API](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) to the
`img` element. This allows the user to decide how the image is scaled
within the element bounds.
- Fixes corner radius not working as expected on overflowing elements.
Matthias Grandl
created
55f4c8e
Encapsulate `CommandPaletteFilter` and `CommandPaletteInterceptor` (#9402)
Click to expand commit body
This PR refactors the `CommandPaletteFilter` and
`CommandPaletteInterceptor` to better encapsulate their internals.
Previously these globals and their fields were publicly accessible,
which meant that there was a lot of reaching in and making
modifications.
These changes should make it easier to add additional consumers of these
hooks (right now they're primarily used by Vim mode).
Release Notes:
- N/A
Marshall Bowers
created
d311a4b
[WIP] chore: Distribute non-universal binaries on Mac (#9284)
Click to expand commit body
Related: #6837, #8671
Release Notes:
- Zed now ships as a non-universal binary, reducing binary size by ~50%.
Piotr Osiewicz
created
dcdd1ec
Small improvements of the task terminal spawn behavior (#9399)
Click to expand commit body
* Add a `reveal: always|never` field in task definitions from tasks.json
, allowing to customize task terminal behavior on spawn
* Ensure reveal: always reveals the terminal even if the old task is
already running
Release Notes:
- Added a `reveal: always|never` (`always` is a default) field in task
definitions from tasks.json , allowing to customize task terminal
behavior on spawn
---------
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Kirill Bulatov
and
Piotr Osiewicz
created
276139f
Implement updating for node-based language servers (#9361)
Click to expand commit body
Fixes: https://github.com/zed-industries/zed/issues/9234
This doesn't address `vue` as it has a slightly different install code,
but it should be fairly simple to add - I'll add it in in a follow-up.
This PR will allow all (except `vue`) node-based language servers to
update. It is mostly just throwing in a method into the `NodeRuntime`
trait that is used for checking if a package doesn't exist locally, or
is out of date, by checking the version against what's newest, and
installing. If any parsing of the `package.json` data fails along the
way, it assumes something has gone awry on the users system, logs the
error, and then proceeds with trying to install the package, so that
users don't get stuck on version if their package has some bad data.
Outside of adding this method, it just adds that check in all of the
language server's individual `fetch_server_binary` methods.
Release Notes:
- Added updating for node-based language servers
([#9234](https://github.com/zed-industries/zed/issues/9234)).
Joseph T. Lyons
created
cb16003
Fill context menu of Zed macOS dock icon with recent projects (#8952)
Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/8416
Release Notes:
- Added recent projects into Zed's macOS dock icon context menu ([8416](https://github.com/zed-industries/zed/issues/8416))
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Daniel Zhu
and
Kirill Bulatov
created
5bf0c8e
Revert "windows: better looking titlebar" and follow-up (#9392)
Click to expand commit body
This reverts #9053 and #9375 because they introduced a regression on
`main` that broke the titlebars on macOS:

Two things are off:
- Left padding is missing
- Titlebar height is less than it was before, which means the
traffic-light buttons are not centered vertically
What @as-cii and I noticed while looking into this: the `cfg!(macos)`
macros that were used don't work like that. You need to check for
`cfg!(target = "macos")` etc. Means that on macOS we never used the
macOS-specific code because the condition was always false.
Overall height, we're not sure about.
Release Notes:
- N/A
Thorsten Ball
created
5ae1451
Fix flickering when interacting with the language server logs (#9390)
Click to expand commit body
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)).
Antonio Scandurra
created
b9f7a37
Add option to collapse all folders in root (#9372)
Click to expand commit body
Release Notes:
- Added option to root project folder to collapse all subfolders
Jack T
created
badcd3f
Remove `Copy` trait for enum Operator (#9378)
Click to expand commit body
In this commit, the Copy trait has been removed from Operator. This
change was necessary due to the value of operator may wish to attach a
motion type, which is not compatible with the Copy trait.
All instances where Operator was previously copied have been updated to
use the clone() or cloned() method instead. This includes function
parameters, variable assignments, and closures.
Hans
created
ee26091
Improve TS and JSON syntax highlighting (#9302)
Click to expand commit body
Successor to #7767.
Release Notes:
- Improved syntax highlighting for TS/TSX and JSON.
Robin Pfäffle
created
27bcb7f
Fix#9253 Duplicate menu item for "Emojis & Symbols" (#9377)
Hello! This PR proposes a redesigned replying system in Zeds chat panel,
inspired by chat applications like [Slack](https://slack.com) and
[Discord](https://discord.com). Feedback and suggestions are welcome! 😄
### TODOs
- [x] Handle replies to removed messages
- [x] Add replied user's profile picture to reply indicator
- [x] Highlight the message that's been selected for replying
--------
### Current Status
https://github.com/zed-industries/zed/assets/146845123/4ed2c2d7-a586-48bd-973c-0d3f033e2c6b
--------
Release Notes:
- Redesigned message replies in the chat panel
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
this PR allows users to use `cmd` instead of `alt` as the
`multi_cursor_modifier` for creating multiple cursors/selections
closes #4339
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Max
and
Conrad Irwin
created
e836a97
vim: Add Multi Replace mode in Vim (#8469)
Click to expand commit body
For #4440, I've only added support for normal, if it's visual mode,
would we like this to delete the current selection row and enter insert
mode?
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Hans
and
Conrad Irwin
created
72d36d0
Foundations for Open All the Things (#9353)
Click to expand commit body
This is the beginning of setting up a flexible way to open items beyond
the text buffer -- think notebooks, images, GeoJSON, etc. The primary
requirement to allow opening an arbitrary file is `try_open` on the
`project::Item` trait. Now we can make new `Item`s for other types with
their own ways to render.
Under the hood, `register_project_item` uses this new opening scheme. It
supports a dynamic array of opener functions, that will handle specific
item types. By default, a `Buffer` should be able to be able to open any
file that another opener did not.
A key detail here is that the order of registration matters. The last
item has primacy. Here's an example:
```rust
workspace::register_project_item::<Editor>(cx);
workspace::register_project_item::<Notebook>(cx);
workspace::register_project_item::<ImageViewer>(cx);
```
When a project item (file) is attempted to be opened, it's first tried
with the `ImageViewer`, followed by the `Notebook`, then the `Editor`.
The tests are set up in a way that should make it _hopefully_ easy to
learn how to write a new opener. First to go after should probably be
image files.
Release Notes:
N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Kyle Kelley
,
Antonio Scandurra
, and
Mikayla Maki
created
Add outlines for .css files
⚠️I also added `workspace = { workspace = true, features =
["test-support"] }` to dev deps of 'languages' crate to make unit tests
work.

~~work in progress. not ready for review. made for visibility only, but
feel free to comment :)~~
TODO:
- [x] add close/min/max buttons (to be rendered with gpui)
- [x] snap layout support
- [x] fix issues with clicking items in titlebar
- [x] cleanup/document
Release Notes:
- Added custom windows titlebar

---------
Co-authored-by: Mikayla <mikayla@zed.dev>
This PR enables the
[`clippy::non_canonical_clone_impl`](https://rust-lang.github.io/rust-clippy/master/index.html#/non_canonical_clone_impl)
rule and fixes the outstanding violations.
Release Notes:
- N/A
Waiting for #9180 to be merged.
The behavior of IME windows is consistent with VS Code.
https://github.com/zed-industries/zed/assets/14981363/14913219-7345-4fec-9cc5-623d0c60acc9
Release Notes:
- N/A
张小白
created
c2d27c4
Use Windows native API to impl dispatcher (#9280)
Click to expand commit body
Using `Threadpool` and `TimerQueue` which are provided by the native
Windows APIs, to implement the corresponding interfaces, we do not need
to sort tasks ourselves as Windows will handle it in a relatively more
efficient manner, I guess. I am unsure if Zed would welcome this PR, and
suggestions are welcome.
Release Notes:
- N/A
This PR enables the
[`clippy::derive_ord_xor_partial_ord`](https://rust-lang.github.io/rust-clippy/master/index.html#/derive_ord_xor_partial_ord)
rule and fixes the outstanding violations.
Release Notes:
- N/A
This PR enables the
[`clippy::eq_op`](https://rust-lang.github.io/rust-clippy/master/index.html#/eq_op)
rule and fixes the outstanding violations.
Enabling this rule seems to have caught two bugs!
Release Notes:
- N/A
Marshall Bowers
created
404adbc
Encode rem values derived from pixels using `rems_from_px` (#9367)
Click to expand commit body
This PR adds a new `rems_from_px` helper function that can be used to
compute rem values based on a pixel value.
This is something we do fairly commonly, where we want to express a size
that is a given pixel size at the base rem size (e.g., "14px when the
rem size is 16px").
`rems_from_px` helps make the intent more explicit, as well as prevent
the base rem size from being duplicated everywhere.
Note: Ideally we would want `rems_from_px` to be `const`, but that
depends on https://github.com/rust-lang/rust/issues/57241.
Release Notes:
- N/A
Marshall Bowers
created
a78576a
Allow `clippy::single_range_in_vec_init` as a permanent rule (#9366)
Click to expand commit body
This PR promotes the allowance of the
[`clippy::single_range_in_vec_init`](https://rust-lang.github.io/rust-clippy/master/index.html#/single_range_in_vec_init)
rule to a permanent one.
This rule complains about a pretty common pattern we use that doesn't
seem to have any adverse effects, so we're going to continue allowing
this rule.
Release Notes:
- N/A
This PR enables the
[`clippy::await_holding_lock`](https://rust-lang.github.io/rust-clippy/master/index.html#/await_holding_lock)
rule and fixes the outstanding violations.
Release Notes:
- N/A
Three changes: two of which are changing `while let` construct to `if
let` as they unconditionally broke and one of which was removing a loop
in the `start_default_prettier` as it unconditionally broke in the
control flow for match installation task: the diff for this is larger
than needed as removing the loop changed a lot of indentation for
`rustfmt`.
This PR updates the README to include Homebrew installation instructions
for the preview version and adds a link to the Homebrew homepage.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Klaus Hipp
and
Marshall Bowers
created
60044a5
Fix panic by preventing opening local files in a remote project (#9304)
Click to expand commit body
Release Notes:
- Fixed a panic caused by allowing the CLI to re-use workspaces
Co-authored-by: Marshall <marshall@zed.dev>
Conrad Irwin
and
Marshall
created
cbf960e
Windows: make `fs` to use workspace `windows` crate (#9350)
Click to expand commit body
Release Notes:
- N/A
张小白
created
a183c33
Prevent long extension descriptions from overflowing (#9348)
Click to expand commit body
This PR fixes an issue where long extension descriptions could take up
more room than intended, pushing the GitHub repository icon off the
screen.
<img width="901" alt="Screenshot 2024-03-14 at 12 54 14 PM"
src="https://github.com/zed-industries/zed/assets/1486634/befce468-f8df-4183-b3cc-9d088dd53b4e">
Fixes #9331.
Release Notes:
- Fixed an issue where long extension descriptions could push the GitHub
repository icon off the screen
([#9331](https://github.com/zed-industries/zed/issues/9331)).
Marshall Bowers
created
3610b07
Restore `--all-targets` for clippy (#9346)
Click to expand commit body
This PR restores the `--all-targets` flag when running `cargo clippy`.
Without it, there are areas that Clippy does not check, as evidenced by
the violations that were caught once the flag was re-added.
Release Notes:
- N/A
Followup to #9341 as I've noticed a CI failure on bundling step of my
other PR
(https://github.com/zed-industries/zed/actions/runs/8283419386/job/22666698264)
Release Notes:
- N/A
Piotr Osiewicz
created
fab5548
Fix project search filtering on projects with multiple worktrees (#9337)
Click to expand commit body
Fixes #9285
Release Notes:
- Fixed a bug that broke search filtering when searching a project with
multiple worktrees
([#9285](https://github.com/zed-industries/zed/issues/9285)).
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
Antonio Scandurra
and
Thorsten
created
7629c16
Always read files to string on a background thread (#9341)
Click to expand commit body
We noticed that when you open a lot of files (i.e. project-wide search
with multi-buffer) that the main thread can become unresponsive, because
while we are async, we still load these files on the main thread.
What this change does is it uses `smol::unblock` to load files on a
different thread.
Release Notes:
- Improved responsiveness when loading files into memory.
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Kirill <kirill@zed.dev>
Thorsten Ball
,
Antonio
, and
Kirill
created
c015baa
Do not start searching if query is empty (#9333)
Click to expand commit body
This avoids the problem of a search being kicked off involuntarily and
potentially using a large amount of CPU when toggling on the `Search
Ignored Files` option.
What would happen is that someone would turn the option on, we'd kick
off a search, and go through all of the files in, say, `node_modules`.
Even if no query was given.
This avoids that.
Release Notes:
- Fixed an empty search being kicked off involuntarily if no query was
typed in yet but an option was toggled.