aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python
diff options
context:
space:
mode:
authorJędrzej Boczar <yendreij@gmail.com>2020-12-20 12:42:11 +0100
committerStephan Seitz <stephan.lauf@yahoo.de>2020-12-21 22:58:17 +0100
commitac42192e1995cdf51d5481e78c69ae0f34edb672 (patch)
tree10ec622ca8c1edbf3094dc9e563f33734aeadcea /queries/python
parentRemove deprecated highlights (diff)
downloadnvim-treesitter-ac42192e1995cdf51d5481e78c69ae0f34edb672.tar
nvim-treesitter-ac42192e1995cdf51d5481e78c69ae0f34edb672.tar.gz
nvim-treesitter-ac42192e1995cdf51d5481e78c69ae0f34edb672.tar.bz2
nvim-treesitter-ac42192e1995cdf51d5481e78c69ae0f34edb672.tar.lz
nvim-treesitter-ac42192e1995cdf51d5481e78c69ae0f34edb672.tar.xz
nvim-treesitter-ac42192e1995cdf51d5481e78c69ae0f34edb672.tar.zst
nvim-treesitter-ac42192e1995cdf51d5481e78c69ae0f34edb672.zip
Improve python/indents.scm
Diffstat (limited to 'queries/python')
-rw-r--r--queries/python/indents.scm36
1 files changed, 29 insertions, 7 deletions
diff --git a/queries/python/indents.scm b/queries/python/indents.scm
index ff828cd91..d629c954f 100644
--- a/queries/python/indents.scm
+++ b/queries/python/indents.scm
@@ -1,16 +1,38 @@
[
- (function_definition)
+ (list)
+ (tuple)
+ (dictionary)
+ (set)
+
(if_statement)
+ (for_statement)
+ (while_statement)
(with_statement)
(try_statement)
- (for_statement)
- (for_in_clause)
+ (import_from_statement)
+
+ (parenthesized_expression)
+ (generator_expression)
+ (list_comprehension)
+ (set_comprehension)
+ (dictionary_comprehension)
+
+ (tuple_pattern)
+ (list_pattern)
+ (argument_list)
+ (parameters)
+ (binary_operator)
+
+ (function_definition)
(class_definition)
] @indent
[
- "elif"
- "else"
- "finally"
- "except"
+ ")"
+ "]"
+ "}"
+ (elif_clause)
+ (else_clause)
+ (except_clause)
+ (finally_clause)
] @branch