Introduce staff-only inline completion provider (#21739)
Release Notes: - N/A --------- Co-authored-by: Thorsten Ball <mrnugget@gmail.com> Co-authored-by: Bennet <bennet@zed.dev> Co-authored-by: Thorsten <thorsten@zed.dev>
This commit is contained in:
parent
39e8944dcc
commit
77b8296fbb
39 changed files with 2890 additions and 356 deletions
|
@ -1162,6 +1162,15 @@ impl Vim {
|
|||
if self.mode == Mode::Replace {
|
||||
self.multi_replace(text, cx)
|
||||
}
|
||||
|
||||
if self.mode == Mode::Normal {
|
||||
self.update_editor(cx, |_, editor, cx| {
|
||||
editor.accept_inline_completion(
|
||||
&editor::actions::AcceptInlineCompletion {},
|
||||
cx,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1174,7 +1183,10 @@ impl Vim {
|
|||
editor.set_input_enabled(vim.editor_input_enabled());
|
||||
editor.set_autoindent(vim.should_autoindent());
|
||||
editor.selections.line_mode = matches!(vim.mode, Mode::VisualLine);
|
||||
editor.set_inline_completions_enabled(matches!(vim.mode, Mode::Insert | Mode::Replace));
|
||||
editor.set_inline_completions_enabled(matches!(
|
||||
vim.mode,
|
||||
Mode::Insert | Mode::Normal | Mode::Replace
|
||||
));
|
||||
});
|
||||
cx.notify()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue