Skip to content

Commit 9aff466

Browse files
committed
chore: deprecate typing.autoClosingAngleBrackets configuration
Signed-off-by: Tarek <tareknaser360@gmail.com>
1 parent d6b701e commit 9aff466

File tree

5 files changed

+1
-31
lines changed

5 files changed

+1
-31
lines changed

crates/ide/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,12 @@ impl Analysis {
410410
&self,
411411
position: FilePosition,
412412
char_typed: char,
413-
autoclose: bool,
414413
chars_to_exclude: Option<String>,
415414
) -> Cancellable<Option<SourceChange>> {
416415
// Fast path to not even parse the file.
417416
if !typing::TRIGGER_CHARS.contains(char_typed) {
418417
return Ok(None);
419418
}
420-
if char_typed == '<' && !autoclose {
421-
return Ok(None);
422-
}
423419
if let Some(chars_to_exclude) = chars_to_exclude {
424420
if chars_to_exclude.contains(char_typed) {
425421
return Ok(None);

crates/rust-analyzer/src/config.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,6 @@ config_data! {
308308
/// Show documentation.
309309
signatureInfo_documentation_enable: bool = true,
310310

311-
/// Whether to insert closing angle brackets when typing an opening angle bracket of a generic argument list.
312-
typing_autoClosingAngleBrackets_enable: bool = false,
313311
/// Specify the characters to exclude from triggering typing assists. The default trigger characters are `.`, `=`, `<`, `>`, `{`, and `(`. Setting this to a string will disable typing assists for the specified characters.
314312
typing_excludeChars: Option<String> = None,
315313

@@ -2158,10 +2156,6 @@ impl Config {
21582156
}
21592157
}
21602158

2161-
pub fn typing_autoclose_angle(&self) -> bool {
2162-
*self.typing_autoClosingAngleBrackets_enable()
2163-
}
2164-
21652159
pub fn typing_exclude_chars(&self) -> Option<String> {
21662160
self.typing_excludeChars().clone()
21672161
}

crates/rust-analyzer/src/handlers/request.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,7 @@ pub(crate) fn handle_on_type_formatting(
461461
}
462462
let chars_to_exclude = snap.config.typing_exclude_chars();
463463

464-
let edit = snap.analysis.on_char_typed(
465-
position,
466-
char_typed,
467-
snap.config.typing_autoclose_angle(),
468-
chars_to_exclude,
469-
)?;
464+
let edit = snap.analysis.on_char_typed(position, char_typed, chars_to_exclude)?;
470465
let edit = match edit {
471466
Some(it) => it,
472467
None => return Ok(None),

docs/user/generated_config.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -992,11 +992,6 @@ Show full signature of the callable. Only shows parameters if disabled.
992992
--
993993
Show documentation.
994994
--
995-
[[rust-analyzer.typing.autoClosingAngleBrackets.enable]]rust-analyzer.typing.autoClosingAngleBrackets.enable (default: `false`)::
996-
+
997-
--
998-
Whether to insert closing angle brackets when typing an opening angle bracket of a generic argument list.
999-
--
1000995
[[rust-analyzer.typing.excludeChars]]rust-analyzer.typing.excludeChars (default: `null`)::
1001996
+
1002997
--

editors/code/package.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2602,16 +2602,6 @@
26022602
}
26032603
}
26042604
},
2605-
{
2606-
"title": "typing",
2607-
"properties": {
2608-
"rust-analyzer.typing.autoClosingAngleBrackets.enable": {
2609-
"markdownDescription": "Whether to insert closing angle brackets when typing an opening angle bracket of a generic argument list.",
2610-
"default": false,
2611-
"type": "boolean"
2612-
}
2613-
}
2614-
},
26152605
{
26162606
"title": "typing",
26172607
"properties": {

0 commit comments

Comments
 (0)