Added first custom injection for highlighting sql in sqlx query macro
This commit is contained in:
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")
|
||||
)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user