diff options
author | Tobias Hunger | 2024-02-07 18:36:29 +0000 |
---|---|---|
committer | GitHub | 2024-02-07 18:36:29 +0000 |
commit | a1272bdb17a63361342a318982e46129d558743c (patch) | |
tree | 9ffc411114f1f7a38b14f75431730480c7ee238e /runtime/queries/rust | |
parent | bbcc89241fd63b460ea7b1661a550f5b9eacba4c (diff) |
slint: Update treesitter parser and queries (#9551)
* slint: Update treesitter parser and queries
* slint: Port over suggestions from nvim review
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)) |