Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Go to file
Thorsten Ball 820ad488e4
Revert "vim: Don't show inline completions in normal mode (#17137)" (#17138)
This reverts commit 9206561662.

It lead to this panic:

```
Thread "main" panicked with "invalid SecondaryMap key used" at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:120:22
   0: backtrace::backtrace::libunwind::trace
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/libunwind.rs:116:5
      backtrace::backtrace::trace_unsynchronized::<<backtrace::capture::Backtrace>::create::{closure#0}>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/mod.rs:66:5
   1: backtrace::backtrace::trace::<<backtrace::capture::Backtrace>::create::{closure#0}>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/mod.rs:53:14
   2: <backtrace::capture::Backtrace>::create
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/capture.rs:197:9
   3: <backtrace::capture::Backtrace>::new
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/capture.rs:162:22
   4: zed::reliability::init_panic_hook::{closure#0}
             at /Users/thorstenball/work/zed/crates/zed/src/reliability.rs:58:29
   5: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2077:9
      std::panicking::rust_panic_with_hook
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:799:13
   6: std::panicking::begin_panic::<&str>::{closure#0}
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:694:9
   7: std::sys_common::backtrace::__rust_end_short_backtrace::<std::panicking::begin_panic<&str>::{closure#0}, !>
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:171:18
   8: std::panicking::begin_panic::<&str>
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:693:12
   9: <slotmap::secondary::SecondaryMap<gpui::app::entity_map::EntityId, alloc::boxed::Box<dyn core::any::Any>> as core::ops::index::Index<gpui::app::entity_map::EntityId>>::index
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slotmap-1.0.7/src/secondary.rs:866:21
  10: <gpui::app::entity_map::EntityMap>::read::<vim::Vim>
             at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:120:22
  11: <gpui::app::entity_map::Model<vim::Vim>>::read
             at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:397:9
  12: <gpui::view::View<vim::Vim>>::read
             at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:81:9
  13: <vim::VimAddon as editor::Addon>::should_show_inline_completions
             at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:138:20
  14: <editor::Editor>::should_show_inline_completions
             at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:2347:21
  15: <editor::Editor>::refresh_inline_completion
             at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:4988:17
  16: <editor::Editor>::undo
             at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:6868:13
  17: vim::normal::register::{closure#7}::{closure#0}
             at /Users/thorstenball/work/zed/crates/vim/src/normal.rs:176:17
  18: <vim::Vim>::update_editor::<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}
             at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:693:45
  19: <gpui:🪟:WindowContext as gpui::VisualContext>::update_view::<editor::Editor, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3890:22
  20: <gpui:🪟:ViewContext<vim::Vim> as gpui::VisualContext>::update_view::<editor::Editor, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4522:9
  21: <gpui::view::View<editor::Editor>>::update::<gpui:🪟:ViewContext<vim::Vim>, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:76:9
  22: <vim::Vim>::update_editor::<(), vim::normal::register::{closure#7}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:693:14
  23: vim::normal::register::{closure#7}
             at /Users/thorstenball/work/zed/crates/vim/src/normal.rs:174:9
  24: <gpui:🪟:ViewContext<vim::Vim>>::listener::<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4444:40
  25: <gpui:🪟:WindowContext as gpui::VisualContext>::update_view::<vim::Vim, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3890:22
  26: <gpui::view::View<vim::Vim>>::update::<gpui:🪟:WindowContext, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:76:9
  27: <gpui::view::WeakView<vim::Vim>>::update::<gpui:🪟:WindowContext, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:192:12
  28: <gpui:🪟:ViewContext<vim::Vim>>::listener::<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4444:13
  29: <editor::Editor>::register_action::<vim::normal::Undo, <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}>::{closure#0}::{closure#0}
             at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:12053:25
  30: <gpui:🪟:WindowContext>::dispatch_action_on_node
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3514:21
  31: <gpui:🪟:WindowContext>::dispatch_key_event
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3303:13
  32: <gpui:🪟:WindowContext>::dispatch_event
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3131:13
  33: <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:776:46
  34: <gpui::app::AppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>::{closure#0}
             at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:1396:26
  35: <gpui::app::AppContext>::update::<core::result::Result<gpui:🪟:DispatchEventResult, anyhow::Error>, <gpui::app::AppContext as gpui::Context>::update_window<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:362:22
  36: <gpui::app::AppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:1387:9
  37: <gpui::app::async_context::AsyncAppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/app/async_context.rs:91:9
  38: <gpui:🪟:AnyWindowHandle>::update::<gpui::app::async_context::AsyncAppContext, gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4750:9
  39: <gpui:🪟:Window>:🆕:{closure#10}
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:775:17
  40: <alloc::boxed::Box<dyn core::ops::function::FnMut<(gpui::interactive::PlatformInput,), Output = gpui:🪟:DispatchEventResult>> as core::ops::function::FnMut<(gpui::interactive::PlatformInput,)>>::call_mut
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2070:9
  41: gpui::platform::mac:🪟:handle_key_event
             at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/window.rs:1300:32
  42: gpui::platform::mac:🪟:handle_key_down
             at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/window.rs:1212:5
  43: <unknown>
  44: <unknown>
  45: <unknown>
  46: <unknown>
  47: <unknown>
  48: <() as objc::message::MessageArguments>::invoke::<()>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/mod.rs:128:17
  49: objc::message::platform::send_unverified::<objc::runtime::Object, (), ()>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/apple/mod.rs:27:9
  50: objc::message::send_message::<objc::runtime::Object, (), ()>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/mod.rs:178:5
      <*mut objc::runtime::Object as cocoa::appkit::NSApplication>::run
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocoa-0.26.0/src/appkit.rs:628:9
  51: <gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run
             at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/platform.rs:427:13
  52: <gpui::app::App>::run::<zed::main::{closure#3}>
             at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:159:9
  53: zed::main
             at /Users/thorstenball/work/zed/crates/zed/src/main.rs:439:5
  54: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:250:5
  55: std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:155:18
  56: std::rt::lang_start::<()>::{closure#0}
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:159:18
  57: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
      std::panicking::try
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
      std::panic::catch_unwind
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:141:48
      std::panicking::try::do_call
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
      std::panicking::try
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
      std::panic::catch_unwind
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
      std::rt::lang_start_internal
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:141:20
  58: std::rt::lang_start::<()>
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:158:17
  59: _main
```

Release Notes:

- N/A
2024-08-30 11:19:49 +02:00
.cargo windows: Bump windows-rs version (#14719) 2024-07-25 10:41:59 -07:00
.cloudflare docs: Black-hole zombie pages 2024-08-20 21:37:41 -04:00
.config tests: Test 'db' package sequentially (#2654) 2023-06-28 15:00:43 +02:00
.github Pin actions/github-script action to 60a0d83 (#17023) 2024-08-28 15:42:31 -04:00
.zed A set of small fixes (#16849) 2024-08-26 02:24:08 +03:00
assets linux: Add an option to disable middle-click paste (#16572) 2024-08-30 09:06:20 +02:00
crates Revert "vim: Don't show inline completions in normal mode (#17137)" (#17138) 2024-08-30 11:19:49 +02:00
docs ruby: Replace default tasks with a stub message (#16752) 2024-08-29 10:32:05 -07:00
extensions ruby: Replace default tasks with a stub message (#16752) 2024-08-29 10:32:05 -07:00
legal Update Terms and Conditions (#16478) 2024-08-19 17:08:46 -04:00
nix nix: Fix gpu-lib/wayland binary patching on nix package (#16958) 2024-08-27 12:24:42 -04:00
script Don't use a mix of tabs and spaces (#17045) 2024-08-28 19:25:19 -04:00
tooling/xtask xtask: Add command for checking packages conform to certain standards (#15236) 2024-07-25 19:20:08 -04:00
.dockerignore Update .dockerignore (#14016) 2024-07-09 16:27:55 -04:00
.git-blame-ignore-revs More ignorable commits (#14596) 2024-07-16 17:09:50 -04:00
.gitattributes Prevent GitHub from displaying comments within JSON files as errors (#7043) 2024-01-29 23:11:25 -05:00
.gitignore Add the ability to store secret dev-only env vars in .env.secret.toml (#15557) 2024-07-31 12:41:09 -07:00
.mailmap Update .mailmap (#16640) 2024-08-21 18:51:58 -04:00
Cargo.lock Update Rust crate sqlx to v0.8.1 [SECURITY] (#17102) 2024-08-29 10:38:07 -07:00
Cargo.toml Revert "Update Rust crate clickhouse to 0.12.0 (#17034)" (#17086) 2024-08-29 10:26:40 -04:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md (#4239) 2024-01-23 22:31:39 -05:00
compose.yml Add Postgrest to Docker Compose (#16498) 2024-08-19 20:50:45 -04:00
CONTRIBUTING.md Update extension docs link in CONTRIBUTING.md (#17074) 2024-08-29 14:27:41 +03:00
debug.plist WIP 2023-12-14 09:25:14 -07:00
default.nix Add zed-editor package and overlay to flake (#16783) 2024-08-26 11:10:34 -04:00
docker-compose.sql collab: Setup database for LLM service (#15882) 2024-08-06 17:18:08 -04:00
Dockerfile collab: Setup database for LLM service (#15882) 2024-08-06 17:18:08 -04:00
flake.lock nix: Fix gpu-lib/wayland binary patching on nix package (#16958) 2024-08-27 12:24:42 -04:00
flake.nix nix: Fix gpu-lib/wayland binary patching on nix package (#16958) 2024-08-27 12:24:42 -04:00
LICENSE-AGPL chore: Add crate licenses. (#4158) 2024-01-23 16:56:22 +01:00
LICENSE-APACHE chore: Add crate licenses. (#4158) 2024-01-23 16:56:22 +01:00
LICENSE-GPL Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
livekit.yaml Add LiveKit server to Docker Compose (#7907) 2024-02-16 10:49:48 -05:00
Procfile Refactor: Restructure collab main function to prepare for new subcommand: serve llm (#15824) 2024-08-05 12:07:38 -07:00
Procfile.postgrest Fix llm queries (#16006) 2024-08-08 17:21:38 -07:00
README.md Update README.md 2024-07-09 14:05:29 -07:00
renovate.json renovate: Fix wasmtime package prefix 2024-07-25 11:45:14 -04:00
rust-toolchain.toml chore: Bump Rust version to 1.80 (#15186) 2024-07-25 22:48:42 +02:00
shell.nix Add zed-editor package and overlay to flake (#16783) 2024-08-26 11:10:34 -04:00
typos.toml Promote package suggestions to a first-class concept on IndexedDocsProviders (#16177) 2024-08-13 16:01:58 -04:00

Zed

CI

Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.


Installation

Packaging status

On macOS and Linux you can download Zed directly or install Zed via your local package manager.

Other platforms are not yet available:

Developing Zed

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, add publish = 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 the accepted array in script/licenses/zed-licenses.toml.
  • Is cargo-about unable to find the license for a dependency? If so, add a clarification field at the end of script/licenses/zed-licenses.toml, as specified in the cargo-about book.