diff options
Diffstat (limited to 'runtime/queries/rust')
-rw-r--r-- | runtime/queries/rust/injections.scm | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/runtime/queries/rust/injections.scm b/runtime/queries/rust/injections.scm index ae9e587f..b05b9d97 100644 --- a/runtime/queries/rust/injections.scm +++ b/runtime/queries/rust/injections.scm @@ -2,12 +2,30 @@ (#set! injection.language "comment")) ((macro_invocation - macro: (identifier) @_html (#eq? @_html "html") + macro: + [ + (scoped_identifier + name: (_) @_macro_name) + (identifier) @_macro_name + ] (token_tree) @injection.content) + (#eq? @_macro_name "html") (#set! injection.language "html") (#set! injection.include-children)) ((macro_invocation + macro: + [ + (scoped_identifier + name: (_) @_macro_name) + (identifier) @_macro_name + ] + (token_tree) @injection.content) + (#eq? @_macro_name "slint") + (#set! injection.language "slint") + (#set! injection.include-children)) + +((macro_invocation (token_tree) @injection.content) (#set! injection.language "rust") (#set! injection.include-children)) |