diff options
author | Triton171 | 2022-08-09 20:32:13 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-10-11 07:48:04 +0000 |
commit | 3ab9abb64283aed54f5ea7e8157629c2a2be3b33 (patch) | |
tree | e818e2f0ebd1b9d1af7d1a433a1bc8ad34933d2d /runtime | |
parent | 8c4ae4df1ccc9465508d48d1407616515974e830 (diff) |
Add `extend-indented` and `stop-extend` captures for indent queries.
Improve and re-enable python indent queries.
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) |