Update 2025-08-29

This commit is contained in:
2025-08-29 13:26:26 +03:00
parent 4224c524a7
commit 346e812e9c
18 changed files with 160 additions and 493 deletions

View File

@@ -1,22 +1,25 @@
;extends
;; Inject into sqlx::query!(r#"..."#, ...) as sql
([
(string_literal)
(raw_string_literal)
] @injection.content
((raw_string_literal) @injection.content
(#match? @injection.content "(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete).+(FROM|from|INTO|into|VALUES|values|SET|set).*(WHERE|where|GROUP BY|group by|ORDER BY|order by)?")
(#offset! @injection.content 0 3 0 -2)
(#set! injection.language "sql")
(#set! injection.include-children)
)
;; Inject HTML into view! macro blocks for leptos
(
(macro_invocation
macro: (identifier) @macro_name
(token_tree) @injecttion.content
)
(#eq? @macro_name "view")
(#set! injection.language "html")
(#set! injection.combined)
)
((string_literal) @injection.content
(#match? @injection.content "(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete).+(FROM|from|INTO|into|VALUES|values|SET|set).*(WHERE|where|GROUP BY|group by|ORDER BY|order by)?")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "sql")
(#set! injection.include-children)
)
; (
; macro_invocation
; (identifier) @name
; (#eq? @name "view")
; (token_tree) @injection.content
; ; (#offset! @injection.content 0 1 0 -1)
; (#set! injection.language "typescriptreact")
; (#set! injection.include-children)
; )