From aa09aa36e2e0237abf015ddee51c15f7d4edd4cf Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Jul 2020 13:42:36 +0200 Subject: Fold multiline fn parameters --- crates/ra_ide/src/folding_ranges.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'crates') 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 { match kind { COMMENT => Some(FoldKind::Comment), USE_ITEM => Some(FoldKind::Imports), - ARG_LIST => Some(FoldKind::ArgList), + ARG_LIST | PARAM_LIST => Some(FoldKind::ArgList), RECORD_FIELD_DEF_LIST | RECORD_FIELD_PAT_LIST | RECORD_FIELD_LIST @@ -383,6 +383,18 @@ fn main() { const _: S = S { }; +"#, + ) + } + + #[test] + fn fold_multiline_params() { + check( + r#" +fn foo( + x: i32, + y: String, +) {} "#, ) } -- cgit v1.2.3