Add extend-indented and stop-extend captures for indent queries.

Improve and re-enable python indent queries.
This commit is contained in:
Triton171 2022-08-09 22:32:13 +02:00 committed by Blaž Hrastnik
parent 8c4ae4df1c
commit 3ab9abb642
3 changed files with 155 additions and 22 deletions

View file

@ -27,12 +27,32 @@
(class_definition)
] @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)