mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
31
runtime/queries/gotmpl/injections.scm
Normal file
31
runtime/queries/gotmpl/injections.scm
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
; {{"put" | printf "%s%s" "out" | printf "%q"}}
|
||||
(function_call
|
||||
function: (identifier) @_function
|
||||
arguments: (argument_list
|
||||
.
|
||||
(interpreted_string_literal) @injection.content)
|
||||
(#eq? @_function "printf")
|
||||
(#set! injection.language "printf"))
|
||||
|
||||
; {{ js "var a = 1 + 1" }}
|
||||
(function_call
|
||||
function: (identifier) @_function
|
||||
arguments: (argument_list
|
||||
.
|
||||
(interpreted_string_literal) @injection.content)
|
||||
(#eq? @_function "js")
|
||||
(#offset! @injection.content 0 1 0 -1)
|
||||
(#set! injection.language "javascript"))
|
||||
|
||||
; {{ html "<h1>hello</h1>" }}
|
||||
(function_call
|
||||
function: (identifier) @_function
|
||||
arguments: (argument_list
|
||||
.
|
||||
(interpreted_string_literal) @injection.content)
|
||||
(#eq? @_function "html")
|
||||
(#offset! @injection.content 0 1 0 -1)
|
||||
(#set! injection.language "html"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue