Files
oak-gpui/crates/languages/src/rust/injections.scm
T
Ben Kunkle 1fb1fecb0a rust: Add injection for leptos view macro (#30710)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-05-14 16:48:22 +00:00

16 lines
528 B
Scheme

(macro_invocation
macro: (identifier) @_macro_name
(#not-any-of? @_macro_name "view" "html")
(token_tree) @injection.content
(#set! injection.language "rust"))
; we need a better way for the leptos extension to declare that
; it wants to inject inside of rust, instead of modifying the 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")
)