mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
fix(t32): update indent queries & test
The latest release of the grammar changes the handling of consecutive line breaks. This breaks the existing test for indents. This commit updates the indent queries and fixes the associated test.
This commit is contained in:
parent
25c591611e
commit
5ec4217567
3 changed files with 34 additions and 33 deletions
|
|
@ -1,28 +1,15 @@
|
|||
; Subroutines & scoping
|
||||
(block
|
||||
")" @indent.branch .) @indent.begin
|
||||
|
||||
(if_block) @indent.begin
|
||||
|
||||
; Control flow statements
|
||||
(
|
||||
(if_block
|
||||
condition: (_)
|
||||
. (_) @_then) @indent.begin
|
||||
(#not-has-type? @_then block)
|
||||
)
|
||||
(if_block
|
||||
(block)) @indent.dedent
|
||||
|
||||
(else_block) @indent.branch
|
||||
|
||||
(else_block
|
||||
(if_block) @indent.dedent) @indent.branch
|
||||
|
||||
(
|
||||
(else_block
|
||||
(if_block
|
||||
condition: (_)
|
||||
. (_) @_then)) @indent.branch
|
||||
(#not-has-type? @_then block)
|
||||
)
|
||||
(if_block) @indent.dedent)
|
||||
|
||||
(while_block
|
||||
(command_expression)) @indent.auto
|
||||
|
|
@ -30,5 +17,4 @@
|
|||
(repeat_block
|
||||
(command_expression)) @indent.auto
|
||||
|
||||
|
||||
(comment) @indent.auto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue