837b711
Update TextField (#10415)
Click to expand commit body
This PR makes some simple updates to the TextField api and update it's styling. Release Notes: - N/A
Nate Butler created
837b711
Update TextField (#10415)
This PR makes some simple updates to the TextField api and update it's styling. Release Notes: - N/A
Nate Butler created
ea165e1
gpui-macros: Hide autogenerated action types/functions (#10417)
I've found it a bit annoying that autogenerated code shows up in completions when working on Zed, so I've moved them into an associated function of a struct we're "implementing" Action on. That way, neither a generated function nor a static show up in completions. Note that this change only affects Zed codebase! I'm pushing it up right after last Preview to give it some time on Nightly. Before:   After:   Release Notes: - N/A
Piotr Osiewicz created
15758c1
docs: Fix installation command via Homebrew (#10416)
When I installed zed by running `brew install zed` following
`README.md`, [brimdata/zed](https://github.com/brimdata/zed) was
installed.
By running `brew install --cask zed`, zed was installed properly.
It seems like `--cask` option is needed.
### Environments:
- OS:
- macOS 13.4
- Homebrew version:
```sh
Homebrew 4.2.17-40-gef1c54e
Homebrew/homebrew-core (git revision 0f61f2950ec; last commit
2024-04-03)
Homebrew/homebrew-cask (git revision 40c0a17ee0; last commit 2024-04-03)
```
Release Notes:
- N/A
Tatsuya Kyushima created
2f616fe
workspace: Add restore_on_startup setting that allows always opening an empty Zed instance (#10366)
Fixes #7694 The new setting accepts "last_workspace" (default) and "none" as options. In a follow-up PR I'll add a new option that re-launches all of the Zed windows and not just the last one. Release Notes: - Added `restore_on_startup` option, accepting `last_workspace` (default) and `none` options. With `none`, new Zed instances will not restore workspaces that were open last.
Piotr Osiewicz created
fef0516
markdown preview: Allow toggling checkbox by click (#10364)
Release Notes: - Added support for toggling a checkbox in markdown preview by clicking on it (cmd+click) ([#5226](https://github.com/zed-industries/zed/issues/5226)). --------- Co-authored-by: Remco Smits <62463826+RemcoSmitsDev@users.noreply.github.com>
Bennet Bo Fenner and Remco Smits created
eb6f7c1
Remove if-not-else patterns (#10402)
Joseph T. Lyons created
36a87d0
Add allow to click on the reply preview to go to the message (#10357)
Release Notes: - Added support for scrolling to the message you are replying to when clicking on the reply preview ([#10028](https://github.com/zed-industries/zed/issues/10028)). Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
Remco Smits and Bennet Bo Fenner created
43c115a
Use set literal notation
Joseph T. Lyons created
859c527
Allow arrow keys to be used in tab switcher (#10396)
In addition to `ctrl-tab` and `ctrl-shift-tab`, VS Code allows changing the selection in the tab switcher via the up and down arrow keys. Release Notes: - Added bindings to allow `up` and `down` arrow keys to be used while the tab switcher is open.
Joseph T. Lyons created
13c14d9
Proxy Danger requests through a proxy service (#10395)
This PR updates Danger to proxy its requests to GitHub through a proxy service. ## Motivation Currently Danger is not able to run on PRs opened from forks of Zed. This is due to GitHub Actions' security policies. Forks are not able to see any of the repository secrets, and the built-in `secrets.GITHUB_TOKEN` has its permissions [restricted](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) to only reads when running on forks. I asked around on the Danger repo, and some big projects (DefinitelyTyped) are working around this by using a publicly-listed (although slightly obfuscated) token: https://github.com/danger/danger-js/issues/918#issuecomment-2048629487. While this approach is _probably_ okay given the limited scope and permissions of the GitHub token, I would still prefer a solution that avoids disclosing the token at all. ## Explanation I ended up writing a small proxy service, [Danger Proxy](https://github.com/maxdeviant/danger-proxy), that can be used to provide Danger with the ability to make authenticated GitHub requests, but without disclosing the token. From the README: > Danger Proxy will: > > - Proxy all requests to `/github/*` to the GitHub API. The provided GitHub API token will be used for authentication. > - Restrict requests to the list of repositories specified in the `ALLOWED_REPOS` environment variable. > - Restrict requests to the subset of the GitHub API that Danger requires. I have an instance of this service deployed to [danger-proxy.fly.dev](https://danger-proxy.fly.dev/). Release Notes: - N/A
Marshall Bowers created
3b68665
Update resvg to fix panic (#10393)
This bumps us up a *long* way on the resvg/usvg crate, to fix a panic Release Notes: - Fixed a panic when rendering certain malformed SVGs
Conrad Irwin created
339b29e
Add open vim keymap command (#9953)
Release Notes: - Added a `vim: open default keymap` command to show the default Vim keymap ([#8593](https://github.com/zed-industries/zed/issues/8593)). Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Mehmet Efe Akça and Marshall Bowers created
d1ad967
Rework task modal (#10341)
New list (used tasks are above the separator line, sorted by the usage recency), then all language tasks, then project-local and global tasks are listed. Note that there are two test tasks (for `test_name_1` and `test_name_2` functions) that are created from the same task template: <img width="563" alt="Screenshot 2024-04-10 at 01 00 46" src="https://github.com/zed-industries/zed/assets/2690773/7455a82f-2af2-47bf-99bd-d9c5a36e64ab"> Tasks are deduplicated by labels, with the used tasks left in case of the conflict with the new tasks from the template: <img width="555" alt="Screenshot 2024-04-10 at 01 01 06" src="https://github.com/zed-industries/zed/assets/2690773/8f5a249e-abec-46ef-a991-08c6d0348648"> Regular recent tasks can be now removed too: <img width="565" alt="Screenshot 2024-04-10 at 01 00 55" src="https://github.com/zed-industries/zed/assets/2690773/0976b8fe-b5d7-4d2a-953d-1d8b1f216192"> When the caret is in the place where no function symbol could be retrieved, no cargo tests for function are listed in tasks: <img width="556" alt="image" src="https://github.com/zed-industries/zed/assets/2690773/df30feba-fe27-4645-8be9-02afc70f02da"> Part of https://github.com/zed-industries/zed/issues/10132 Reworks the task code to simplify it and enable proper task labels. * removes `trait Task`, renames `Definition` into `TaskTemplate` and use that instead of `Arc<dyn Task>` everywhere * implement more generic `TaskId` generation that depends on the `TaskContext` and `TaskTemplate` * remove `TaskId` out of the template and only create it after "resolving" the template into the `ResolvedTask`: this way, task templates, task state (`TaskContext`) and task "result" (resolved state) are clearly separated and are not mixed * implement the logic for filtering out non-related language tasks and tasks that have non-resolved Zed task variables * rework Zed template-vs-resolved-task display in modal: now all reruns and recently used tasks are resolved tasks with "fixed" context (unless configured otherwise in the task json) that are always shown, and Zed can add on top tasks with different context that are derived from the same template as the used, resolved tasks * sort the tasks list better, showing more specific and least recently used tasks higher * shows a separator between used and unused tasks, allow removing the used tasks same as the oneshot ones * remote the Oneshot task source as redundant: all oneshot tasks are now stored in the inventory's history * when reusing the tasks as query in the modal, paste the expanded task label now, show trimmed resolved label in the modal * adjusts Rust and Elixir task labels to be more descriptive and closer to bash scripts Release Notes: - Improved task modal ordering, run and deletion capabilities
Kirill Bulatov created
b0eda77
Add a few tests to cover other folder names (#10356)
Added additional tests to cover other folder names in regards to [#10193](https://github.com/zed-industries/zed/issues/10193) and [#9729](https://github.com/zed-industries/zed/issues/9729). I had a similar issue but with folder names like '2.5' and '2.5_backup'. I didn't see test coverage for those kinds of file names, so wanted to add them.  Release Notes: - N/A Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Jonathan Green and Marshall Bowers created
fd3ee5a
Use proper Workspace references when querying for tasks by name (#10383)
Closes https://github.com/zed-industries/zed/issues/10380 Release Notes: - Fixed Zed panicking when running tasks via a keybinding ([10380](https://github.com/zed-industries/zed/issues/10380))
Kirill Bulatov created
8cbdd9e
Refactor workspace notifications to use explicit `NotificationId` type (#10342)
This PR reworks the way workspace notifications are identified to use a new `NotificationId` type. A `NotificationId` is bound to a given type that is used as a unique identifier. Generally this will be a unit struct that can be used to uniquely identify this notification. A `NotificationId` can also accept an optional `ElementId` in order to distinguish between different notifications of the same type. This system avoids the issue we had previously of selecting `usize` IDs somewhat arbitrarily and running the risk of having two independent notifications collide (and thus interfere with each other). This also fixes a bug where multiple suggestion notifications for the same extension could be live at once Fixes https://github.com/zed-industries/zed/issues/10320. Release Notes: - Fixed a bug where multiple extension suggestions for the same extension could be shown at once ([#10320](https://github.com/zed-industries/zed/issues/10320)). --------- Co-authored-by: Max <max@zed.dev>
Marshall Bowers and Max created
322f68f
linux: wayland: fix cursor set_icon (#10374)
Release Notes: - Partially (Wayland implementation) Fixed [#10124](https://github.com/zed-industries/zed/issues/10124)). The recent refactor of the linux gpui implementation (https://github.com/zed-industries/zed/pull/10227) broke the wayland cursor update logic by setting the cursor icon as `None`. Fix it by setting the `cursor_icon_name`.
Joel Selvaraj created
195f9d9
haskell: Bump to v0.1.0 (#10378)
This PR bumps the Haskell extension to v0.1.0. This version of the Haskell extension brings improved labels for symbols: <img width="569" alt="Screenshot 2024-04-10 at 3 38 01 PM" src="https://github.com/zed-industries/zed/assets/1486634/759fa52f-7b85-4395-abfd-070138201162"> Release Notes: - N/A
Marshall Bowers created
3a6e0bb
gleam: Bump to v0.1.0 (#10376)
This PR bumps the Gleam extension to v0.1.0. This version of the Gleam extension brings improved completion labels: <img width="572" alt="Screenshot 2024-04-10 at 3 30 25 PM" src="https://github.com/zed-industries/zed/assets/1486634/afca4563-c520-4f01-949f-2c8095769751"> Release Notes: - N/A
Marshall Bowers created
fdddbfc
Fix caret movement issue for some special characters (#10198)
Currently in Zed, certain characters require pressing the key twice to
move the caret through that character. For example: "❤️" and "y̆".
The reason for this is as follows:
Currently, Zed uses `chars` to distinguish different characters, and
calling `chars` on `y̆` will yield two `char` values: `y` and `\u{306}`,
and calling `chars` on `❤️` will yield two `char` values: `❤` and
`\u{fe0f}`.
Therefore, consider the following scenario (where ^ represents the
caret):
- what we see: ❤️ ^
- the actual buffer: ❤ \u{fe0f} ^
After pressing the left arrow key once:
- what we see: ❤️ ^
- the actual buffer: ❤ ^ \u{fe0f}
After pressing the left arrow key again:
- what we see: ^ ❤️
- the actual buffer: ^ ❤ \u{fe0f}
Thus, two left arrow key presses are needed to move the caret, and this
PR fixes this bug (or this is actually a feature?).
I have tried to keep the scope of code modifications as minimal as
possible. In this PR, Zed handles such characters as follows:
- what we see: ❤️ ^
- the actual buffer: ❤ \u{fe0f} ^
After pressing the left arrow key once:
- what we see: ^ ❤️
- the actual buffer: ^ ❤ \u{fe0f}
Or after pressing the delete key:
- what we see: ^
- the actual buffer: ^
Please note that currently, different platforms and software handle
these special characters differently, and even the same software may
handle these characters differently in different situations. For
example, in my testing on Chrome on macOS, GitHub treats `y̆` as a
single character, just like in this PR; however, in Rust Playground,
`y̆` is treated as two characters, and pressing the delete key does not
delete the entire `y̆` character, but instead deletes `\u{306}` to yield
the character `y`. And they both treat `❤️` as a single character,
pressing the delete key will delete the entire `❤️` character.
This PR is based on the principle of making changes with the smallest
impact on the code, and I think that deleting the entire character with
the delete key is more intuitive.
Release Notes:
- Fix caret movement issue for some special characters
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
张小白 , Conrad Irwin , Thorsten , and Bennet created
3648d79
Reduce the frequency writing window size and position information to the database (#10315)
Release Notes: - N/A
张小白 created
081e9b9
Fix panic when loading malformed Wasm files (#10370)
This PR fixes a potential panic that could occur when loading malformed
Wasm files.
We now use the `parse_wasm_extension_version` function that was
previously used just to extract the Zed extension API version from the
Wasm bytes as a pre-validation step. By parsing the entirety of the Wasm
file here instead of returning as soon as we find the version, the
invalid Wasm bytes are now surfaced as an `Err` instead of a panic.
We were able to replicate the panic using the following test:
```rs
#[gpui::test]
async fn test_bad_wasm(cx: &mut TestAppContext) {
init_test(cx);
let wasm_host = cx.update(|cx| {
WasmHost::new(
FakeFs::new(cx.background_executor().clone()),
FakeHttpClient::with_200_response(),
FakeNodeRuntime::new(),
Arc::new(LanguageRegistry::test(cx.background_executor().clone())),
PathBuf::from("/the/work/dir".to_string()),
cx,
)
});
let mut wasm_bytes = std::fs::read("/Users/maxdeviant/Library/Application Support/Zed/extensions/installed/dart/extension.wasm").unwrap();
// This is the error message we were seeing in the stack trace:
// range end index 267037 out of range for slice of length 253952
dbg!(&wasm_bytes.len());
// Truncate the bytes to the same point:
wasm_bytes.truncate(253952);
std::fs::write("/tmp/bad-extension.wasm", wasm_bytes.clone()).unwrap();
let manifest = Arc::new(ExtensionManifest {
id: "the-extension".into(),
name: "The Extension".into(),
version: "0.0.1".into(),
schema_version: SchemaVersion(1),
description: Default::default(),
repository: Default::default(),
authors: Default::default(),
lib: LibManifestEntry {
kind: None,
version: None,
},
themes: Default::default(),
languages: Default::default(),
grammars: Default::default(),
language_servers: Default::default(),
});
// 💥
let result = wasm_host
.load_extension(wasm_bytes, manifest, cx.executor())
.await;
dbg!(result.map(|_| ()));
```
Release Notes:
- Fixed a crash that could occur when loading malformed Wasm extensions
([#10352](https://github.com/zed-industries/zed/issues/10352)).
---------
Co-authored-by: Max <max@zed.dev>
Marshall Bowers and Max created
3cf93df
Revert "Update `GITHUB_TOKEN` environment variable for Danger (#10365)"
Danger doesn't appear to work with PRs from forks: https://github.com/danger/danger-js/issues/918 Will need to research this some more. This reverts commit 53d0cc61460fde18469e415596acd8d77d92f7c5.
Marshall Bowers created
53d0cc6
Update `GITHUB_TOKEN` environment variable for Danger (#10365)
This PR updates the `GITHUB_TOKEN` environment variable that we use for Danger so that it should (hopefully) be able to run for PRs of external contributors. Followed the instructions outlined [here](https://danger.systems/js/guides/getting_started#setting-up-danger-to-run-on-your-ci). Danger comments will now by left by the @zed-industries-bot: <img width="951" alt="Screenshot 2024-04-10 at 1 07 15 PM" src="https://github.com/zed-industries/zed/assets/1486634/d28cd537-9626-47df-8878-75a778824ef4"> Release Notes: - N/A
Marshall Bowers created
03d853d
Introduce TextField by adding the `ui_text_field` crate (#10361)
There hasn't been a componentized way to create inputs or text fields thus far due to the innate circular dependency between the `ui` and `editor` crates. To bypass this issue we are introducing a new `ui_text_field` crate to specifically handle this component. `TextField` provides the ability to add stacked or inline labels, as well as applies a standard visual style to inputs. Example:  We'll continue to evolve this component in the near future and start using it in the app once we've built out the needed functionality. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Nate Butler and Marshall Bowers created
d03f1c4
v0.132.x dev
Joseph T. Lyons created
fc10201
Remove occasionally incorrect expectation (#10358)
This panic has occured a handful of times, I think it must be the case that: 1. Item is dropped outside of an update loop 2. The next update is this one In that case no flush effects will have called the release observers yet, but we cannot upgrade the WeakModel because the ref count is 0 Release Notes: - Fixed a (rare) panic while collaborating
Conrad Irwin created
7abb63c
Improve the ergonomics of creating local buffers (#10347)
This PR renames `language::Buffer::new` to `language::Buffer::local` and
simplifies its interface. Instead of taking a replica id (which should
always be 0 for the local case) and a `BufferId`, which was awkward and
verbose to construct, it simply takes text and a `cx`.
It uses the `cx` to derive a `BufferId` from the `EntityId` associated
with the `cx`, which should always be positive based on the following
analysis...
We convert the entity id to a u64 using this method on `EntityId`, which
is defined by macros in the `slotmap` crate:
```rust
pub fn as_ffi(self) -> u64 {
(u64::from(self.version.get()) << 32) | u64::from(self.idx)
}
```
If you look at the type of `version` in `KeyData`, it is non-zero:
```rust
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct KeyData {
idx: u32,
version: NonZeroU32,
}
```
This commit also adds `Context::reserve_model` and
`Context::insert_model` to determine a model's entity ID before it is
created, which we need in order to assign a `BufferId` in the background
when loading a buffer asynchronously.
Release Notes:
- N/A
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Nathan Sobo and Piotr Osiewicz created
664efef
Remove line breaks when displaying file names in the project panel (#10231)
- Fixed #8603 For the label title of the project panel, I find that there is no place to use to get the title of the label to do some operations, it should be safe to modify it, but I'm not sure how we need to modify the problem, I can think of two scenarios: 1. Modify every place where you don't want multiple lines to appear 2. Make the label only display a single line (e.g. provide a new parameter, or a new label type?)
Hans created
26299fb
chat panel: Fix new messages indicator appearing when message was deleted (#10278)
Release Notes: Fixed an issue where the "New messages" indicator in the channel chat would be shown even if the message was deleted
Bennet Bo Fenner created
39e0e26
Line numbers short mode (#10354)
Followup to #10327 It can be enabled with the following setting: "line_indicator_format": "short" No release note, as the original change didn't go out to Preview yet. /cc @bartekpacia @0x2CA Release Notes: - N/A
Piotr Osiewicz created
4151ba1
X11: Don't emit keypress events for modifiers (#10271)
This fixes certain shortcuts/motions on X11 like in vim mode "v i )", where previously zed would interpret it as "v i SHIFT )" due to the x11 backend emitting key press events for modifier keys even though other platforms like Wayland don't. This also adds support for ModifiersChanged events to X11 Release Notes: - Fixed vim motions like "v i )" not working on X11 ([#10199](https://github.com/zed-industries/zed/issues/10199)).
Kamal Ahmad created
6ac3431
Windows: Fix render resource not being released (#10233)
Release Notes: - N/A
CharlesChen0823 created
c763c8c
windows: Implement `restart` action (#10234)
Release Notes: - N/A
张小白 created
bfd9bb8
Use shared text system on Linux and Windows (#10098)
closes #10129 closes #10269 Release Notes: - N/A
Ezekiel Warren created
8f69eac
Update blade to a version that can run GLES for Zed (#10243)
Release Notes: - N/A Picks up https://github.com/kvark/blade/pull/105, https://github.com/kvark/blade/pull/97, and more Switches the presentation to be non-blocking, which will improve the latency slightly. Allows to start playing with GLES backend, e.g. ```bash cd crates/gpui RUSTFLAGS="--cfg gles" CARGO_TARGET_DIR=./target-gl cargo run --example hello_world ``` It doesn't currently render properly due to an issue that needs investigation, see https://github.com/kvark/blade/pull/105#issuecomment-2041006542 But at least it's a start Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Dzmitry Malyshau and Mikayla Maki created
3fc08a0
Fix a bug from the Linux rewrite where Wayland windows would not render properly (#10343)
Release Notes: - N/A
Mikayla Maki created
fff197b
Show lines selected & selection quantity in status bar (#10327)
Fixes #4204     Release Notes: - Line number indicator now shows number of lines selected and a number of selections.
Piotr Osiewicz created
6b320b9
Fix cleanup of LSP request status messages (#10336)
This fixes a bug in https://github.com/zed-industries/zed/pull/9818, where the status was not removed if the request failed. It also adds replication of these new status messages to guests when collaborating. Release Notes: - Fixed an issue where the status of failed LSP actions was left in the status bar --------- Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Max Brunsfeld , Marshall , and Marshall Bowers created
a0ee29a
Use first line comment prefix when toggling comments (#10335)
This fixed an issue introduced in https://github.com/zed-industries/zed/pull/10126, where, when toggling comments in a language with multiple line comment prefixes (e.g. Gleam, Erlang) Zed would insert the *last* prefix instead of the first. Release Notes: - Fixed an issue where the `toggle comments` command inserted the wrong line comment prefix in some languages (preview only). Co-authored-by: Marshall <marshall@zed.dev>
Max Brunsfeld and Marshall created
0331fde
Parse human readable module name for Rust tasks (#10337)
Part of https://github.com/zed-industries/zed/issues/10132 extracted out of a bigger PR that refactors tasks and shows labels that look more like commands (ergo needs better readable package names) Release Notes: - N/A
Kirill Bulatov created
7dfc718
Use task icons for all kinds of tasks (#10333)
<img width="565" alt="image" src="https://github.com/zed-industries/zed/assets/2690773/cbb59154-1153-459a-978c-8c125e879d27"> <img width="562" alt="image" src="https://github.com/zed-industries/zed/assets/2690773/d3f65a09-2f75-4db8-85c2-1abb591e609c"> Release Notes: - Added more icons to task modal
Kirill Bulatov created
759c65d
Show errors when failing to create directories on startup (#10326)
Release Notes: - Improved error reporting on startup ([#9036](https://github.com/zed-industries/zed/issues/9036)).
Conrad Irwin created
0533923
Reduce memory usage to represent buffers by up to 50% (#10321)
This should help with some of the memory problems reported in https://github.com/zed-industries/zed/issues/8436, especially the ones related to large files (see: https://github.com/zed-industries/zed/issues/8436#issuecomment2037442695), by **reducing the memory required to represent a buffer in Zed by ~50%.** ### How? Zed's memory consumption is dominated by the in-memory representation of buffer contents. On the lowest level, the buffer is represented as a [Rope](https://en.wikipedia.org/wiki/Rope_(data_structure)) and that's where the most memory is used. The layers above — buffer, syntax map, fold map, display map, ... — basically use "no memory" compared to the Rope. Zed's `Rope` data structure is itself implemented as [a `SumTree` of `Chunks`](https://github.com/zed-industries/zed/blob/8205c52d2bc204b8234f9306562d9000b1691857/crates/rope/src/rope.rs#L35-L38). An important constant at play here is `CHUNK_BASE`: `CHUNK_BASE` is the maximum length of a single text `Chunk` in the `SumTree` underlying the `Rope`. In other words: It determines into how many pieces a given buffer is split up. By changing `CHUNK_BASE` we can adjust the level of granularity withwhich we index a given piece of text. Theoretical maximum is the length of the text, theoretical minimum is 1. Sweet spot is somewhere inbetween, where memory use and performance of write & read access are optimal. We started with `16` as the `CHUNK_BASE`, but that wasn't the result of extensive benchmarks, more the first reasonable number that came to mind. ### What This changes `CHUNK_BASE` from `16` to `64`. That reduces the memory usage, trading it in for slight reduction in performance in certain benchmarks. ### Benchmarks I added a benchmark suite for `Rope` to determine whether we'd regress in performance as `CHUNK_BASE` goes up. I went from `16` to `32` and then to `64`. While `32` increased performance and reduced memory usage, `64` had one slight drop in performance, increases in other benchmarks and substantial memory savings. | `CHUNK_BASE` from `16` to `32` | `CHUNK_BASE` from `16` to `64` | |-------------------|--------------------| |  |  | ### Real World Results We tested this by loading a 138 MB `*.tex` file (parsed as plain text) into Zed and measuring in `Instruments.app` the allocation. #### standard allocator Before, with `CHUNK_BASE: 16`, the memory usage was ~827MB after loading the buffer. | `CHUNK_BASE: 16` | |---------------------| |  | After, with `CHUNK_BASE: 64`, the memory usage was ~396MB after loading the buffer. | `CHUNK_BASE: 64` | |---------------------| |  | #### `mimalloc` `MiMalloc` by default and that seems to be pretty aggressive when it comes to growing memory. Whereas the std allocator would go up to ~800mb, MiMalloc would jump straight to 1024MB. I also can't get `MiMalloc` to work properly with `Instruments.app` (it always shows 15MB of memory usage) so I had to use these `Activity Monitor` screenshots: | `CHUNK_BASE: 16` | |---------------------| |  | | `CHUNK_BASE: 64` | |---------------------| |  | ### Release Notes Release Notes: - Reduced memory usage for files by up to 50%. --------- Co-authored-by: Antonio <antonio@zed.dev>
Thorsten Ball and Antonio created
b6857ca
Use v0.0.6 of the `zed_extension_api` for extensions that need it (#10324)
This PR updates the extensions dependent on v0.0.6 of the `zed_extension_api` crate to use the now-published version on crates.io instead of a path dependency. The impacted extensions are: - `dart` - `gleam` - `haskell` - `svelte` Release Notes: - N/A
Marshall Bowers created
132b8aa
Improve extension API documentation (#10322)
This PR adds some more documentation to symbols exported from the `zed_extension_api` crate. Release Notes: - N/A
Marshall Bowers created
4140583
Switch to the system UI font on macOS (#10317)
To reference the system font, use the special ".SystemUIFont" family name. /cc @PixelJanitor Release Notes: - Switched to the system UI font for user interface elements on macOS. Co-authored-by: Antonio Scandurra <antonio@zed.dev>
Nathan Sobo and Antonio Scandurra created
8205c52
Only apply host-side executable fix to binaries downloaded by the extension (#10318)
This PR makes it so our temporary host-side workaround for setting certain language server binaries as executable only applies to binaries that are downloaded by the extension. Previously we would do this for any binary, including ones that could have been sourced from the $PATH. Release Notes: - Fixed a file permissions issue when trying to use a Zig language server (`zls`) present on the $PATH.
Marshall Bowers created
4fb9f41
gpui/metal: Clamp max texture width/height to 16kB (#10314)
Fixed #10149 A user had Zed crash due to invalid font size in settings. It turned out the width/height of glyphs does not pass validation in Metal texture initialization with a large enough font size. All modern Macs have a max texture width/height of 16kB (barring Apple A8, used by iPhone 6 back in 2014, which uses 8kB). This commit clamps texture size at 16kB. Note that while it fixes Zed crash, using a font size that hits the limit is still pretty unusable - the users will still have a pretty unusable editor, but at least it won't crash for them. Release Notes: - Fixed crashes with huge `buffer_font_size` values.
Piotr Osiewicz created
935e0d5
Improve Find/Replace shortcuts (#10297)
This PR changes ways the Find/Replace functionality in the Buffer/Project Search is accessible via shortcuts. It makes those panels work the same way as in VS Code and Sublime Text. The details are described in the issue: [Make Find/Replace easier to use](https://github.com/zed-industries/zed/issues/9142) There's a difficulty with the Linux keybindings: VS Code uses on MacOS (this PR replicates it): | Action | Buffer Search | Project Search | | --- | --- | --- | | Find | `cmd-f` | `cmd-shift-f` | | Replace | `cmd-alt-f` | `cmd-shift-h` | VS Code uses on Linux (this PR replicates all but one): | Action | Buffer Search | Project Search | | --- | --- | --- | | Find | `ctrl-f` | `ctrl-shift-f` | | Replace | `ctrl-h` ❗ | `ctrl-shift-h` | The problem is that `ctrl-h` is already taken by the `editor::Backspace` action in Zed on Linux. There's two options here: 1. Change keybinding for `editor::Backspace` on Linux to something else, and use `ctrl-h` for the "replace in buffer" action. 2. Use some other keybinding on Linux in Zed. This PR introduces `ctrl-r` for this purpose, though I'm not sure it's the best choice. What do you think? fixes #9142 Release Notes: - Improved access to "Find/Replace in Buffer" and "Find/Replace in Files" via shortcuts (#9142). Optionally, include screenshots / media showcasing your addition that can be included in the release notes. - N/A
Andrew Lygin created