Python: add folds

This commit is contained in:
Santos Gallegos 2020-09-03 11:09:57 -05:00 committed by Thomas Vigouroux
parent 38df2d252f
commit bdf43b15df

24
queries/python/fold.scm Normal file
View file

@ -0,0 +1,24 @@
(function_definition (block) @fold)
(class_definition (block) @fold)
(while_statement (block) @fold)
(for_statement (block) @fold)
(if_statement (block) @fold)
(with_statement (block) @fold)
(try_statement (block) @fold)
[
(import_from_statement)
(parameters)
(parenthesized_expression)
(generator_expression)
(list_comprehension)
(set_comprehension)
(dictionary_comprehension)
(tuple)
(list)
(set)
(dictionary)
] @fold