mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Python: add folds
This commit is contained in:
parent
38df2d252f
commit
bdf43b15df
1 changed files with 24 additions and 0 deletions
24
queries/python/fold.scm
Normal file
24
queries/python/fold.scm
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue