Zed Improved. Aiming to improve upon Zed and make a truly delightful code editor.
https://zed.dev
![]() Crashes look like: ``` Panic `offset 632 is greater than the snapshot.len() 631` on thread 0 (com.apple.main-thread) <multi_buffer::MultiBufferSnapshot>::innermost_enclosing_bracket_ranges::<usize> editor::highlight_matching_bracket::refresh_matching_bracket_highlights <gpui::app::App>::update_window_id::<bool, <gpui::app::context::Context<editor::Editor>>::subscribe_in<multi_buffer::MultiBuffer, multi_buffer::Event, <editor::Editor>::on_buffer_event>::{closure#0}::{closure#0}>::{closure#0} <gpui::app::context::Context<editor::Editor>>::subscribe_in::<multi_buffer::MultiBuffer, multi_buffer::Event, <editor::Editor>::on_buffer_event>::{closure#0} <gpui::app::App>::flush_effects <project::lsp_store::LocalLspStore>::format_buffer_locally::{closure#0} <project::lsp_store::LspStore>::format::{closure#1}::{closure#0}::<i32> ``` Though `format_buffer_locally` is not always present. Both issue reports mention usage of the agent. I suspect this is somehow a result of agent format-on-save combined with the user's cursor being at the end of the buffer as it's getting edited by the agent. The offsets are always off-by-one in the error, so at first I thought the issue was the condition `head < snapshot.buffer_snapshot.len()` before setting `tail` to be `head + 1`, but an offset equal to len is valid. Seems like to get a `to_offset` crash, `head` must be greater than `len`. Which is quite weird, a selection's offset should never be out of bounds. Since this code is just about highlighting brackets, this PR logs an error instead of crashing in the `head > len` case. Closes #32732, #32171 Release Notes: - N/A |
||
---|---|---|
.cargo | ||
.cloudflare | ||
.config | ||
.github | ||
.zed | ||
assets | ||
crates | ||
docs | ||
extensions | ||
legal | ||
nix | ||
script | ||
tooling | ||
.clinerules | ||
.cursorrules | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.prettierrc | ||
.rules | ||
.windsurfrules | ||
Cargo.lock | ||
Cargo.toml | ||
CLAUDE.md | ||
clippy.toml | ||
CODE_OF_CONDUCT.md | ||
compose.yml | ||
CONTRIBUTING.md | ||
Cross.toml | ||
debug.plist | ||
default.nix | ||
docker-compose.sql | ||
Dockerfile-collab | ||
Dockerfile-collab.dockerignore | ||
Dockerfile-cross | ||
Dockerfile-cross.dockerignore | ||
Dockerfile-distros | ||
Dockerfile-distros.dockerignore | ||
flake.lock | ||
flake.nix | ||
LICENSE-AGPL | ||
LICENSE-APACHE | ||
LICENSE-GPL | ||
livekit.yaml | ||
lychee.toml | ||
Procfile | ||
Procfile.postgrest | ||
README.md | ||
renovate.json | ||
rust-toolchain.toml | ||
shell.nix | ||
typos.toml |
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS and Linux you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Windows (tracking issue)
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about
to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specified
error for a crate you've created? If so, addpublish = false
under[package]
in your crate's Cargo.toml. - Is the error
failed to satisfy license requirements
for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theaccepted
array inscript/licenses/zed-licenses.toml
. - Is
cargo-about
unable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml
, as specified in the cargo-about book.