From d5cf9f4add7037c3f833b4495582aabec8adc549 Mon Sep 17 00:00:00 2001 From: Cassandra McCarthy Date: Fri, 1 Oct 2021 14:12:32 -0400 Subject: [PATCH] docs: add note about `vscode-vim` in `on_enter` I found myself search for this, so building off of #3013 and #3308, I hope this note is useful. --- crates/ide/src/typing/on_enter.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/ide/src/typing/on_enter.rs b/crates/ide/src/typing/on_enter.rs index 5cba9d11d0..88d9777f1d 100644 --- a/crates/ide/src/typing/on_enter.rs +++ b/crates/ide/src/typing/on_enter.rs @@ -36,6 +36,16 @@ use text_edit::TextEdit; // } // ---- // +// When using the Vim plugin: +// [source,json] +// ---- +// { +// "key": "Enter", +// "command": "rust-analyzer.onEnter", +// "when": "editorTextFocus && !suggestWidgetVisible && editorLangId == rust && vim.mode == 'Insert'" +// } +// ---- +// // image::https://user-images.githubusercontent.com/48062697/113065578-04c21800-91b1-11eb-82b8-22b8c481e645.gif[] pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option { let parse = db.parse(position.file_id);