Skip to content

Commit 80bd8a4

Browse files
committed
fix: Temporarily disable + typing handler as it moves the cursor position
1 parent e7971e4 commit 80bd8a4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ config_data! {
344344
/// - typing `{` in a use item adds a closing `}` in the right place
345345
/// - typing `>` to complete a return type `->` will insert a whitespace after it
346346
/// - typing `<` in a path or type position inserts a closing `>` after the path or type.
347-
typing_triggerChars: Option<String> = Some("=.+".to_owned()),
347+
typing_triggerChars: Option<String> = Some("=.".to_owned()),
348348

349349

350350
/// Enables automatic discovery of projects using [`DiscoverWorkspaceConfig::command`].

src/tools/rust-analyzer/docs/book/src/configuration_generated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ Show documentation.
14171417

14181418
## rust-analyzer.typing.triggerChars {#typing.triggerChars}
14191419

1420-
Default: `"=.+"`
1420+
Default: `"=."`
14211421

14221422
Specify the characters allowed to invoke special on typing triggers.
14231423
- typing `=` after `let` tries to smartly add `;` if `=` is followed by an existing expression

src/tools/rust-analyzer/editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2846,7 +2846,7 @@
28462846
"properties": {
28472847
"rust-analyzer.typing.triggerChars": {
28482848
"markdownDescription": "Specify the characters allowed to invoke special on typing triggers.\n- typing `=` after `let` tries to smartly add `;` if `=` is followed by an existing expression\n- typing `=` between two expressions adds `;` when in statement position\n- typing `=` to turn an assignment into an equality comparison removes `;` when in expression position\n- typing `.` in a chain method call auto-indents\n- typing `{` or `(` in front of an expression inserts a closing `}` or `)` after the expression\n- typing `{` in a use item adds a closing `}` in the right place\n- typing `>` to complete a return type `->` will insert a whitespace after it\n- typing `<` in a path or type position inserts a closing `>` after the path or type.",
2849-
"default": "=.+",
2849+
"default": "=.",
28502850
"type": [
28512851
"null",
28522852
"string"

0 commit comments

Comments
 (0)