summaryrefslogtreecommitdiffstats
path: root/queries/python
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-06-29 21:34:52 +0200
committerStephan Seitz <stephan.seitz@fau.de>2022-05-15 19:14:52 +0200
commitc9ebd16c2884c3ab7463c6cafa0385971db7456b (patch)
treee5c5ca82dcd8d10d529df36ba5d16c3abd172098 /queries/python
parentDon't expect any change on reindenting the whole unfinished-call.php (diff)
downloadnvim-treesitter-c9ebd16c2884c3ab7463c6cafa0385971db7456b.tar
nvim-treesitter-c9ebd16c2884c3ab7463c6cafa0385971db7456b.tar.gz
nvim-treesitter-c9ebd16c2884c3ab7463c6cafa0385971db7456b.tar.bz2
nvim-treesitter-c9ebd16c2884c3ab7463c6cafa0385971db7456b.tar.lz
nvim-treesitter-c9ebd16c2884c3ab7463c6cafa0385971db7456b.tar.xz
nvim-treesitter-c9ebd16c2884c3ab7463c6cafa0385971db7456b.tar.zst
nvim-treesitter-c9ebd16c2884c3ab7463c6cafa0385971db7456b.zip
python(folds): fold whole functions not only body
Diffstat (limited to 'queries/python')
-rw-r--r--queries/python/folds.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/queries/python/folds.scm b/queries/python/folds.scm
index aacd0aaca..78e1e2c00 100644
--- a/queries/python/folds.scm
+++ b/queries/python/folds.scm
@@ -1,13 +1,14 @@
-(function_definition (block) @fold)
-(class_definition (block) @fold)
+[
+ (function_definition)
+ (class_definition)
-(while_statement (block) @fold)
-(for_statement (block) @fold)
-(if_statement (block) @fold)
-(with_statement (block) @fold)
-(try_statement (block) @fold)
+ (while_statement)
+ (for_statement)
+ (if_statement)
+ (with_statement)
+ (try_statement)
+ (match_statement)
-[
(import_from_statement)
(parameters)
(argument_list)