Added first custom injection for highlighting sql in sqlx query macro
This commit is contained in:
parent
e598cf8a0d
commit
2060c74012
|
@ -23,6 +23,7 @@ return {
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
"bash",
|
"bash",
|
||||||
|
"sql",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
|
|
13
nvim/dot-config/nvim/queries/rust/injections.scm
Normal file
13
nvim/dot-config/nvim/queries/rust/injections.scm
Normal 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")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user