aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/python
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/python')
-rw-r--r--runtime/queries/python/indents.scm (renamed from runtime/queries/python/indents.scm_)26
1 files changed, 23 insertions, 3 deletions
diff --git a/runtime/queries/python/indents.scm_ b/runtime/queries/python/indents.scm
index 810ff52f..b7b499c0 100644
--- a/runtime/queries/python/indents.scm_
+++ b/runtime/queries/python/indents.scm
@@ -28,11 +28,31 @@
] @indent
[
+ (if_statement)
+ (for_statement)
+ (while_statement)
+ (with_statement)
+ (try_statement)
+
+ (function_definition)
+ (class_definition)
+] @extend
+
+[
+ (return_statement)
+ (break_statement)
+ (continue_statement)
+ (raise_statement)
+ (pass_statement)
+] @extend.prevent-once
+
+[
")"
"]"
"}"
- (return_statement)
- (pass_statement)
- (raise_statement)
] @outdent
+(elif_clause
+ "elif" @outdent)
+(else_clause
+ "else" @outdent)