mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(dart): replace slow indent with simpler strategy
Pattern for dedenting else blocks is painfully slow (~20% of total test time), so replace with `@indent.auto` for the whole `if_statement` for now.
This commit is contained in:
parent
fb91060f59
commit
cc908cfcd7
1 changed files with 6 additions and 5 deletions
|
|
@ -5,7 +5,6 @@
|
|||
(declaration
|
||||
(initializers))
|
||||
(switch_block)
|
||||
(if_statement)
|
||||
(formal_parameter_list)
|
||||
(formal_parameter)
|
||||
(list_literal)
|
||||
|
|
@ -41,8 +40,10 @@
|
|||
(break_statement
|
||||
";" @indent.end)
|
||||
|
||||
; this one is for dedenting the else block
|
||||
(if_statement
|
||||
(block) @indent.branch)
|
||||
|
||||
(comment) @indent.ignore
|
||||
|
||||
; dedenting the else block is painfully slow; replace with simpler strategy
|
||||
; (if_statement) @indent.begin
|
||||
; (if_statement
|
||||
; (block) @indent.branch)
|
||||
(if_statement) @indent.auto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue