Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/python/indents.scm')
| -rw-r--r-- | runtime/queries/python/indents.scm | 52 |
1 files changed, 3 insertions, 49 deletions
diff --git a/runtime/queries/python/indents.scm b/runtime/queries/python/indents.scm index 67bc76ad..810ff52f 100644 --- a/runtime/queries/python/indents.scm +++ b/runtime/queries/python/indents.scm @@ -9,8 +9,6 @@ (while_statement) (with_statement) (try_statement) - (match_statement) - (case_clause) (import_from_statement) (parenthesized_expression) @@ -29,56 +27,12 @@ (class_definition) ] @indent -; Workaround for the tree-sitter grammar creating large errors when a -; try_statement is missing the except/finally clause -(ERROR - "try" - . - ":" @indent @extend) -(ERROR - . - "def") @indent @extend -(ERROR - (block) @indent @extend - (#set! "scope" "all")) - -[ - (if_statement) - (for_statement) - (while_statement) - (with_statement) - (try_statement) - (match_statement) - (case_clause) - - (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) - -(parameters - . - (identifier) @anchor - (#set! "scope" "tail")) @align -(argument_list - . - (_) @anchor - (#set! "scope" "tail")) @align |