mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
fix(rust): Add back 1 indent for macro rules (#5834)
This commit is contained in:
parent
6548bb64c1
commit
c41d38b70e
1 changed files with 10 additions and 0 deletions
|
|
@ -24,6 +24,16 @@
|
||||||
(macro_definition)
|
(macro_definition)
|
||||||
] @indent.begin
|
] @indent.begin
|
||||||
|
|
||||||
|
; Typing in "(" inside macro definitions breaks the tree entirely
|
||||||
|
; Making macro_definition becoming errors
|
||||||
|
; Offset this by adding back one indent for start of macro rules
|
||||||
|
(ERROR
|
||||||
|
.
|
||||||
|
"macro_rules!"
|
||||||
|
"(" @indent.begin
|
||||||
|
(#set! indent.immediate)
|
||||||
|
(#set! indent.start_at_same_line))
|
||||||
|
|
||||||
(trait_item
|
(trait_item
|
||||||
body: (_) @indent.begin)
|
body: (_) @indent.begin)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue