agent: Support vim-mode in the agent panel's editor (#31915)

Closes #30081

Release Notes:

- Added vim-mode support in the agent panel's editor

---------

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
Oleksiy Syvokon 2025-06-02 22:10:31 +03:00 committed by GitHub
parent ec69b68e72
commit 864767ad35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 1 deletions

View file

@ -433,6 +433,12 @@ impl Vim {
fn activate(editor: &mut Editor, window: &mut Window, cx: &mut Context<Editor>) {
let vim = Vim::new(window, cx);
if !editor.mode().is_full() {
vim.update(cx, |vim, _| {
vim.mode = Mode::Insert;
});
}
editor.register_addon(VimAddon {
entity: vim.clone(),
});