aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python/folds.scm
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2020-09-13 11:23:26 -0500
committerThomas Vigouroux <tomvig38@gmail.com>2020-09-14 18:26:30 +0200
commit50991e370b0d253ada9029000d23189a95f9dec3 (patch)
treef576043443fbc8260c8e6701723ee7483588aafc /queries/python/folds.scm
parentFix typo in foldexpr example (diff)
downloadnvim-treesitter-50991e370b0d253ada9029000d23189a95f9dec3.tar
nvim-treesitter-50991e370b0d253ada9029000d23189a95f9dec3.tar.gz
nvim-treesitter-50991e370b0d253ada9029000d23189a95f9dec3.tar.bz2
nvim-treesitter-50991e370b0d253ada9029000d23189a95f9dec3.tar.lz
nvim-treesitter-50991e370b0d253ada9029000d23189a95f9dec3.tar.xz
nvim-treesitter-50991e370b0d253ada9029000d23189a95f9dec3.tar.zst
nvim-treesitter-50991e370b0d253ada9029000d23189a95f9dec3.zip
Folds: rename query files to folds.scm to be consistent
We use plural names for all query files except folds.
Diffstat (limited to 'queries/python/folds.scm')
-rw-r--r--queries/python/folds.scm25
1 files changed, 25 insertions, 0 deletions
diff --git a/queries/python/folds.scm b/queries/python/folds.scm
new file mode 100644
index 000000000..16c0cb482
--- /dev/null
+++ b/queries/python/folds.scm
@@ -0,0 +1,25 @@
+(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)
+ (argument_list)
+
+ (parenthesized_expression)
+ (generator_expression)
+ (list_comprehension)
+ (set_comprehension)
+ (dictionary_comprehension)
+
+ (tuple)
+ (list)
+ (set)
+ (dictionary)
+] @fold