34e846b
Use `Mutex` instead of a `RefCell` to acquire/release instance buffers (#7291)
Click to expand commit body
This fixes a panic happening when releasing an instance buffer.
Releasing the buffer happens on a different thread but the borrow
checker was not catching it because the metal buffer completion handler
API doesn't have a `Send` marker on it.
Release Notes:
- N/A
Antonio Scandurra
created
889a6e2
Use `command_buffer.wait_until_scheduled` in metal renderer (#7283)
Click to expand commit body
This commit goes back to using `wait_until_scheduled` as opposed to
`wait_until_completed`. What this means, however, is that another draw
could take place before the previous one finished. When that happens we
don't want to reuse the same instance buffer because the GPU is actively
reading from it, so we use a pool instead.
Release Notes:
- Fixed a bug that caused inconsistent frame rate when scrolling on
certain hardware.
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Antonio <antonio@zed.dev>
Thorsten Ball
,
Antonio Scandurra
, and
Antonio
created
0bf444d
Introduce a fast path for drawing quads with no borders / corner radii (#7231)
Click to expand commit body
This will introduce an extra conditional but saves us from doing a bunch
of math in the simple case of drawing simple rectangles that aren't
rounded or don't have borders.

Release Notes:
- Improved rendering performance.
958fbac
Filter LSP github releases that have no assets to properly download LSP servers (#7189)
Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/7183
Release Notes:
- Filter lsp github releases that have no assets ([7189](https://github.com/zed-industries/zed/issues/7183))
Ares Andrew
created
bb6c06e
assistant: render api key editor if no credentials are set (#7197)
Click to expand commit body
This hopefully reduces confusion for new users. I updated the docs just
this morning, but I figured it's probably better to fix the issue
itself.
So what this does is to render the API key editor whenever the assistant
panel is opened/focused and no credentials can be found.
See: https://github.com/zed-industries/zed/discussions/6943
Release Notes:
- Fixed assistant panel not showing dialog to enter API key when opened
without saved credentials.
---------
Co-authored-by: Piotr <piotr@zed.dev>
Thorsten Ball
and
Piotr
created
2e9f665
Watch the themes directory for changes (#7173)
Click to expand commit body
This PR makes Zed watch the themes directory for changes.
When theme files are added or modified, we reload the theme and apply
any changes to Zed.
Release Notes:
- Added live reloading for the themes directory.
- Disallow sharing gitignored files through collab
- Show errors when failing to open files
- Show a warning to followers when view is unshared
/cc @mikaylamaki, let's update this to use your `private_files` config
before merge.
Release Notes:
- Added the ability to prevent sharing private files over collab.
---------
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
f98d636
WIP: Add a setting to visually redact enviroment variables (#7124)
Click to expand commit body
Release Notes:
- Added bash syntax highlighting to `.env` files.
- Added a `private_files` setting for configuring which files should be
considered to contain environment variables or other sensitive
information.
- Added a `redact_private_values` setting to add or remove censor bars
over variable values in files matching the `private_files` patterns.
-(internal) added a new `redactions.scm` query to our language support,
allowing different config file formats to indicate where environment
variable values can be identified in the syntax tree, added this query
to `bash`, `json`, `toml`, and `yaml` files.
---------
Co-authored-by: Nathan <nathan@zed.dev>
Mikayla Maki
and
Nathan
created
5333eff
Improve file finder by ignoring spaces in query (#7068)
Click to expand commit body
Release Notes:
- Changed file finder to ignore spaces in queries ([#5324
](https://github.com/zed-industries/zed/issues/5324)).

---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Ben Hamment
and
Marshall Bowers
created
135bca2
vim: Make H/M/L work in visual mode (#7166)
ebdabb9
vim: Support counts for `H` and `L` motions (#7149)
Click to expand commit body
Release Notes:
- Added support for counts to `H` and `L` motions
([#4941](https://github.com/zed-industries/zed/issues/4941)).
Vishal Bhavsar
created
689d430
Don't panic when collaborating with older Zed versions (#7162)
Click to expand commit body
Older Zed versions may send a buffer id of 0, which is no-longer
supported. (as of #6993)
This doesn't fix that, but it does ensure that we don't panic in the
workspace by maintaining the invariant that from_proto_state returns
Some(Task) if the variant matches.
It also converts the panic to an error should something similar happen
again in the future.
Release Notes:
- N/A
From https://github.com/microsoft/mimalloc:
> In our benchmarks (see
[below](https://github.com/microsoft/mimalloc#performance)), mimalloc
outperforms other leading allocators (jemalloc, tcmalloc, Hoard, etc),
and often uses less memory. A nice property is that it does consistently
well over a wide range of benchmarks. There is also good huge OS page
support for larger server programs.
Release Notes:
- Changed default allocator to mimalloc.
This PR adjusts the heading levels in the docs, as some of them weren't
following the right hierarchy.
I also formatted all of the docs with Prettier.
Release Notes:
- N/A
Closes #4595
Release Notes:
- Added LSP support for Elm
([#4595](https://github.com/zed-industries/zed/issues/4595)).
---------
Co-authored-by: Jared M. Smith <absynce@gmail.com>
e5fe811
theme_importer: Add ability to print theme JSON schema (#7129)
Click to expand commit body
This PR adds a quick subcommand to the `theme_importer` to facilitate
printing out the JSON schema for a theme.
Note that you do need to pass a `<PATH>` to the subcommand still, even
though it will be ignored. I'll rework the CLI to this at some point.
The JSON schema for the current version of the theme can also be found
at
[`https://zed.dev/schema/themes/v0.1.0.json`](https://zed.dev/schema/themes/v0.1.0.json).
Release Notes:
- N/A
Marshall Bowers
created
9459394
Re-enable language plugin functionality with some fixes (#7105)
Click to expand commit body
Part of https://github.com/zed-industries/zed/issues/7096
* [x] Load all queries for language plugins, not just highlight query
* [x] Auto-reload languages when changing the `plugins` directory
* [x] Bump Tree-sitter for language loading and unloading fixes
* [x] Figure out code signing
Release Notes:
- N/A
---------
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Max Brunsfeld
,
Antonio
, and
Marshall Bowers
created
db99d4f
No more nightly/preview collab anymore (#7112)
Click to expand commit body
Release Notes:
- N/A
Conrad Irwin
created
aee0f65
Attempt to fix a panic in worktree scanning (#7128)
Click to expand commit body
Somehow (and this should be investigated separately) we're ending up
with paths that look like: /path/to/project/../../path/to/dependency,
these pass the Ok(repo_path) = path.strip_prefix(), but then fail.
Release Notes:
- Fixed (hopefully) a panic that could occur due to path confusing in
git status
Conrad Irwin
created
dbb5fad
Fix some formatting issues in `Cargo.toml` files (#7127)
Click to expand commit body
This PR fixes some formatting issues in some of the `Cargo.toml` files.
I tried to fix most of these in #7126, but there were a few that I
missed.
Release Notes:
- N/A
Marshall Bowers
created
28f875f
Note installation step via Homebrew (#7053)
Click to expand commit body
https://formulae.brew.sh/cask/zed
Zongle Wang
created
e338f34
Sort dependencies in `Cargo.toml` files (#7126)
Click to expand commit body
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.
This should make them easier to visually scan when looking for a
dependency.
Apologies in advance for any merge conflicts 🙈
Release Notes:
- N/A
This PR restricts access to the `Audio` global to force consumers to go
through the `Audio` public interface to interact with it.
Release Notes:
- N/A
Marshall Bowers
created
176f63e
Add ability to copy a permalink to a line (#7119)
Click to expand commit body
This PR adds the ability to copy the permalink to a line from within
Zed.
This functionality is available through the `editor: copy permalink to
line` action in the command palette:
<img width="589" alt="Screenshot 2024-01-30 at 7 07 46 PM"
src="https://github.com/zed-industries/zed/assets/1486634/332282cb-211f-4f16-9eb1-415bcfee9b7b">
Executing this action will create a permalink to the currently selected
line(s) and copy it to the clipboard.
Here is an example line:
```
https://github.com/maxdeviant/auk/blob/56c80e80112744740be1969c89fdd34db4be6f64/src/lib.rs#L25
```
Currently, both GitHub and GitLab are supported.
### Notes and known limitations
- In order to determine where to permalink to, we read the URL of the
`origin` remote in Git. This feature will not work if the `origin`
remote is not present.
- Attempting to permalink to a ref that is not pushed to the origin will
result in the link 404ing.
- Attempting to permalink when Git is in a dirty state may not generate
the right link.
- For instance, modifying a file (e.g., adding new lines) and grabbing a
permalink to it will result in incorrect line numbers.
Release Notes:
- Added the ability to copy a permalink to a line
([#6777](https://github.com/zed-industries/zed/issues/6777)).
- Available via the `editor: copy permalink to line` action in the
command palette.
Marshall Bowers
created
cbcaca4
Show highlighted symbol in the scrollbar (#7029)
Click to expand commit body
Release Notes:
- Added highlighted symbols to the scrollbar; partially mentioned in:
- https://github.com/zed-industries/zed/issues/5308
- https://github.com/zed-industries/zed/issues/4866
911b4b5
Migrate automatically on service start (#7103)
Click to expand commit body
This avoids a forgettable manual step in deploying collab
Release Notes:
- N/A
Conrad Irwin
created
2e7f9c4
Use fully-qualified name to avoid an unused import (#7104)
Click to expand commit body
This PR adjusts how we implement `Global` conditionally to avoid an
unused import when compiling in release mode.
Release Notes:
- N/A
Marshall Bowers
created
a54eaae
Add raw window handle implementations to GPUI (#7101)
Click to expand commit body
This is in preparation for experiments with wgpu. This should have no
external effect.
Release Notes:
- N/A
Mikayla Maki
created
1d794db
Only `impl Global` for `DebugBelow` when compiling with `debug_assertions` (#7102)
Click to expand commit body
This PR fixes this error when compiling a release build:
<img width="504" alt="Screenshot 2024-01-30 at 2 30 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/96470735-2b9e-4945-b4c3-c86ef0168b8c">
`DebugBelow` only exists when compiling with `debug_assertions`, so we
only want to implement it using that same criterion.
Release Notes:
- N/A
Marshall Bowers
created
e756602
log: Use local timezone in log timestamps (#7079)
Click to expand commit body
I'm gonna let it sit for a day in case anybody has any objections to
that change.
Release Notes:
- Logs now use local timestamps instead of UTC-based timestamps
---------
Co-authored-by: Beniamin <beniamin@zagan.be>
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Piotr Osiewicz
,
Marshall
, and
Marshall Bowers
created
Release Notes:
- Added the ability to set settings per-release stage
- Added a `"server_url"` setting
Conrad Irwin
created
c073552
Add logging for the font_descriptor panic (#7097)
Click to expand commit body
Release Notes:
- Fixed a panic caused by an inconsistency in font metrics.
Conrad Irwin
created
631f885
Ensure sqlez build succeeds on Windows (#7072)
Click to expand commit body
On Windows, `OsStr` must be a valid
[WTF-8](https://simonsapin.github.io/wtf-8/) sequence, and there are no
safety ways converting from bytes to OsStr in std. So I added
`PathExt::try_from_bytes` and use it in `sqlez`.