mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 08:50:11 -04:00
feat(c-family): inherit injections
This commit is contained in:
parent
628d5e442c
commit
310f0925ec
7 changed files with 21 additions and 24 deletions
|
|
@ -26,6 +26,12 @@
|
|||
(macro_definition)
|
||||
] @indent.begin
|
||||
|
||||
(trait_item
|
||||
body: (_) @indent.begin)
|
||||
|
||||
(string_literal
|
||||
(escape_sequence)) @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
|
||||
|
|
@ -85,6 +91,15 @@
|
|||
|
||||
(tuple_struct_pattern
|
||||
")" @indent.end)
|
||||
; 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))
|
||||
|
||||
(tuple_type
|
||||
")" @indent.end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue