Improve indent queries for python in specific cases (#5332)

where the tree-sitter completely fails to parse incomplete code.
pull/5443/head
Triton171 2 years ago committed by GitHub
parent 9f0d939f25
commit 873434b927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -29,6 +29,19 @@
(class_definition) (class_definition)
] @indent ] @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) (if_statement)
(for_statement) (for_statement)

Loading…
Cancel
Save