mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 13:00:08 -04:00
Add Python else elif dedent (#4618)
* feat(python): add interactive else/elif dedent * fixup * add test
This commit is contained in:
parent
358a463c82
commit
1ca9b938c1
3 changed files with 13 additions and 0 deletions
|
|
@ -83,6 +83,14 @@
|
|||
(continue_statement)
|
||||
] @indent.dedent
|
||||
|
||||
(ERROR
|
||||
(_) @indent.branch ":" .
|
||||
(#lua-match? @indent.branch "^else"))
|
||||
|
||||
(ERROR
|
||||
(_) @indent.branch @indent.dedent ":" .
|
||||
(#lua-match? @indent.branch "^elif"))
|
||||
|
||||
(parenthesized_expression ")" @indent.end)
|
||||
(generator_expression ")" @indent.end)
|
||||
(list_comprehension "]" @indent.end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue