diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-31 11:50:11 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-31 11:50:11 +0100 |
commit | 09df51dab89340bcf4b8ede95c02c32b0c8eb2bc (patch) | |
tree | 0240c629fe96243e1a1c91ccd679947bfb1ecb03 /crates/ra_ide/src/typing.rs | |
parent | 5f7225446e75509ae0d971a6f3e2b9d3e37d6f2a (diff) | |
parent | 13a996f3b68c175f6e6ad8d89081e45850dc5583 (diff) |
Merge #4664
4664: Generate feature documentation from code r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/typing.rs')
-rw-r--r-- | crates/ra_ide/src/typing.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_ide/src/typing.rs b/crates/ra_ide/src/typing.rs index 39bb3b357..67e2c33a0 100644 --- a/crates/ra_ide/src/typing.rs +++ b/crates/ra_ide/src/typing.rs | |||
@@ -32,6 +32,13 @@ pub(crate) use on_enter::on_enter; | |||
32 | 32 | ||
33 | pub(crate) const TRIGGER_CHARS: &str = ".=>"; | 33 | pub(crate) const TRIGGER_CHARS: &str = ".=>"; |
34 | 34 | ||
35 | // Feature: On Typing Assists | ||
36 | // | ||
37 | // Some features trigger on typing certain characters: | ||
38 | // | ||
39 | // - typing `let =` tries to smartly add `;` if `=` is followed by an existing expression | ||
40 | // - Enter inside comments automatically inserts `///` | ||
41 | // - typing `.` in a chain method call auto-indents | ||
35 | pub(crate) fn on_char_typed( | 42 | pub(crate) fn on_char_typed( |
36 | db: &RootDatabase, | 43 | db: &RootDatabase, |
37 | position: FilePosition, | 44 | position: FilePosition, |