Skip to content

Commit 6b10dec

Browse files
bors[bot]7596ff
andauthored
Merge #10416
10416: docs: add note about `vscode-vim` in `on_enter` r=lnicola a=7596ff I found myself search for this, so building off of #3013 and #3308, I hope this note is useful. Co-authored-by: Cassandra McCarthy <[email protected]>
2 parents 7afa84e + d5cf9f4 commit 6b10dec

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/ide/src/typing/on_enter.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ use text_edit::TextEdit;
3636
// }
3737
// ----
3838
//
39+
// When using the Vim plugin:
40+
// [source,json]
41+
// ----
42+
// {
43+
// "key": "Enter",
44+
// "command": "rust-analyzer.onEnter",
45+
// "when": "editorTextFocus && !suggestWidgetVisible && editorLangId == rust && vim.mode == 'Insert'"
46+
// }
47+
// ----
48+
//
3949
// image::https://user-images.githubusercontent.com/48062697/113065578-04c21800-91b1-11eb-82b8-22b8c481e645.gif[]
4050
pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option<TextEdit> {
4151
let parse = db.parse(position.file_id);

0 commit comments

Comments
 (0)