Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 5b25304

Browse files
authored
Merge pull request #300 from atom/b3-fold-if
Allow folding if statement without elif or else
2 parents b5011ef + 4d55d0e commit 5b25304

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

grammars/tree-sitter-python.cson

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ fileTypes: [
2525
]
2626

2727
folds: [
28+
{
29+
type: ['if_statement']
30+
start: {type: ':'}
31+
end: {type: ['elif_clause', 'else_clause']}
32+
},
2833
{
2934
type: [
35+
'if_statement'
3036
'elif_clause'
3137
'else_clause'
3238
'for_statement'
@@ -39,11 +45,6 @@ folds: [
3945
]
4046
start: {type: ':'}
4147
},
42-
{
43-
type: ['if_statement']
44-
start: {type: ':'}
45-
end: {type: ['elif_clause', 'else_clause']}
46-
}
4748
{
4849
start: {type: '(', index: 0}
4950
end: {type: ')', index: -1}

0 commit comments

Comments
 (0)