mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
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>
This commit is contained in:
commit
6b10decb20
1 changed files with 10 additions and 0 deletions
|
@ -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[]
|
// 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> {
|
pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option<TextEdit> {
|
||||||
let parse = db.parse(position.file_id);
|
let parse = db.parse(position.file_id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue