about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-01 18:27:55 +0000
committerGitHub <noreply@github.com>2021-10-01 18:27:55 +0000
commit6b10decb209ca753bb1e623b94ded0e0ff79892f (patch)
treeb6c15d0c387f6b08267b6582fe33bcf41b083066
parent7afa84ef410bd136a8395bd14778ffa2c99b6e17 (diff)
parentd5cf9f4add7037c3f833b4495582aabec8adc549 (diff)
downloadrust-6b10decb209ca753bb1e623b94ded0e0ff79892f.tar.gz
rust-6b10decb209ca753bb1e623b94ded0e0ff79892f.zip
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 <cassie@7596ff.com>
-rw-r--r--crates/ide/src/typing/on_enter.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ide/src/typing/on_enter.rs b/crates/ide/src/typing/on_enter.rs
index 5cba9d11d00..88d9777f1dc 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<TextEdit> {
     let parse = db.parse(position.file_id);