rust: Add injection for leptos view macro (#30710)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
parent
bc99a86bb7
commit
1fb1fecb0a
1 changed files with 13 additions and 5 deletions
|
@ -1,7 +1,15 @@
|
||||||
(macro_invocation
|
(macro_invocation
|
||||||
(token_tree) @injection.content
|
macro: (identifier) @_macro_name
|
||||||
(#set! injection.language "rust"))
|
(#not-any-of? @_macro_name "view" "html")
|
||||||
|
(token_tree) @injection.content
|
||||||
|
(#set! injection.language "rust"))
|
||||||
|
|
||||||
(macro_rule
|
; we need a better way for the leptos extension to declare that
|
||||||
(token_tree) @injection.content
|
; it wants to inject inside of rust, instead of modifying the rust
|
||||||
(#set! injection.language "rust"))
|
; injections to support leptos injections
|
||||||
|
(macro_invocation
|
||||||
|
macro: (identifier) @_macro_name
|
||||||
|
(#any-of? @_macro_name "view" "html")
|
||||||
|
(token_tree) @injection.content
|
||||||
|
(#set! injection.language "rstml")
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue