mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Fold multiline fn parameters
This commit is contained in:
parent
91b2f0baaf
commit
aa09aa36e2
1 changed files with 13 additions and 1 deletions
|
@ -84,7 +84,7 @@ fn fold_kind(kind: SyntaxKind) -> Option<FoldKind> {
|
|||
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() <fold block>{
|
|||
const _: S = S <fold block>{
|
||||
|
||||
}</fold>;
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fold_multiline_params() {
|
||||
check(
|
||||
r#"
|
||||
fn foo<fold arglist>(
|
||||
x: i32,
|
||||
y: String,
|
||||
)</fold> {}
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue