mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-09-11 16:07:00 +03:00
Improve indent queries for python in specific cases (#5332)
where the tree-sitter completely fails to parse incomplete code.
This commit is contained in:
parent
9f0d939f25
commit
873434b927
@ -29,6 +29,19 @@
|
||||
(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)
|
||||
|
Loading…
Reference in New Issue
Block a user