mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(ecma): inject sql template methods
This commit is contained in:
parent
d13f0183ba
commit
110a50e371
1 changed files with 19 additions and 0 deletions
|
|
@ -43,6 +43,25 @@
|
|||
(#set! injection.include-children)
|
||||
(#set! injection.language "html"))
|
||||
|
||||
; Vercel PostgreSQL
|
||||
; foo.sql`...` or foo.sql(`...`)
|
||||
(call_expression
|
||||
function: [
|
||||
(await_expression
|
||||
(member_expression
|
||||
property: (property_identifier) @injection.language))
|
||||
(member_expression
|
||||
property: (property_identifier) @injection.language)
|
||||
]
|
||||
arguments: [
|
||||
(arguments
|
||||
(template_string) @injection.content)
|
||||
(template_string) @injection.content
|
||||
]
|
||||
(#eq? @injection.language "sql")
|
||||
(#offset! @injection.content 0 1 0 -1)
|
||||
(#set! injection.include-children))
|
||||
|
||||
(call_expression
|
||||
function: [
|
||||
(await_expression
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue