aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-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..c648aebc 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-indented
+
+[
+ (return_statement)
+ (break_statement)
+ (continue_statement)
+ (raise_statement)
+ (pass_statement)
+] @stop-extend
+
+[
")"
"]"
"}"
- (return_statement)
- (pass_statement)
- (raise_statement)
] @outdent
+(elif_clause
+ "elif" @outdent)
+(else_clause
+ "else" @outdent)