aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-27 12:42:36 +0100
committerAleksey Kladov <[email protected]>2020-07-27 12:42:36 +0100
commitaa09aa36e2e0237abf015ddee51c15f7d4edd4cf (patch)
tree9ba5f868e8d6f57f1c48a79b24f19cf174b900f0 /crates/ra_ide
parent91b2f0baafa5fe1827ed13c56721b5f505564e7c (diff)
Fold multiline fn parameters
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/folding_ranges.rs14
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#"
394fn foo<fold arglist>(
395 x: i32,
396 y: String,
397)</fold> {}
398"#,
399 )
400 }
389} 401}