diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-27 12:48:10 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-27 12:48:10 +0100 |
commit | 020a40335bb2d45245d1164e4075e7f622084705 (patch) | |
tree | 04ab629e3669e81d38349bc7a52947f0eb19c9ef /crates | |
parent | bc9fab156596d05ddb6b3fa57acd0fbd0755f2a0 (diff) | |
parent | aa09aa36e2e0237abf015ddee51c15f7d4edd4cf (diff) |
Merge #5547
5547: Fold multiline fn parameters r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide/src/folding_ranges.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/ra_ide/src/folding_ranges.rs b/crates/ra_ide/src/folding_ranges.rs index e7ec9953f..315808890 100644 --- a/crates/ra_ide/src/folding_ranges.rs +++ b/crates/ra_ide/src/folding_ranges.rs | |||
@@ -84,7 +84,7 @@ fn fold_kind(kind: SyntaxKind) -> Option<FoldKind> { | |||
84 | match kind { | 84 | match kind { |
85 | COMMENT => Some(FoldKind::Comment), | 85 | COMMENT => Some(FoldKind::Comment), |
86 | USE_ITEM => Some(FoldKind::Imports), | 86 | USE_ITEM => Some(FoldKind::Imports), |
87 | ARG_LIST => Some(FoldKind::ArgList), | 87 | ARG_LIST | PARAM_LIST => Some(FoldKind::ArgList), |
88 | RECORD_FIELD_DEF_LIST | 88 | RECORD_FIELD_DEF_LIST |
89 | | RECORD_FIELD_PAT_LIST | 89 | | RECORD_FIELD_PAT_LIST |
90 | | RECORD_FIELD_LIST | 90 | | RECORD_FIELD_LIST |
@@ -386,4 +386,16 @@ const _: S = S <fold block>{ | |||
386 | "#, | 386 | "#, |
387 | ) | 387 | ) |
388 | } | 388 | } |
389 | |||
390 | #[test] | ||
391 | fn fold_multiline_params() { | ||
392 | check( | ||
393 | r#" | ||
394 | fn foo<fold arglist>( | ||
395 | x: i32, | ||
396 | y: String, | ||
397 | )</fold> {} | ||
398 | "#, | ||
399 | ) | ||
400 | } | ||
389 | } | 401 | } |