Added first custom injection for highlighting sql in sqlx query macro

This commit is contained in:
Dreaded_X 2024-04-17 06:34:24 +02:00
parent e598cf8a0d
commit 2060c74012
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4
2 changed files with 14 additions and 0 deletions

View File

@ -23,6 +23,7 @@ return {
"markdown",
"markdown_inline",
"bash",
"sql",
},
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)

View File

@ -0,0 +1,13 @@
; extends
(macro_invocation
(scoped_identifier
path: (identifier) @path (#eq? @path "sqlx")
name: (identifier) @name (#eq? @name "query")
)
(token_tree
(raw_string_literal
(string_content) @injection.content
(#set! injection.language "sql")
)
)
)