mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 13:30:01 -04:00
28 lines
652 B
Scheme
28 lines
652 B
Scheme
; Comments
|
|
((comment) @injection.content
|
|
(#set! injection.language "comment"))
|
|
|
|
; Body
|
|
((json_body) @injection.content
|
|
(#set! injection.language "json"))
|
|
|
|
((xml_body) @injection.content
|
|
(#set! injection.language "xml"))
|
|
|
|
((graphql_data) @injection.content
|
|
(#set! injection.language "graphql"))
|
|
|
|
; Script (default to javascript)
|
|
((script) @injection.content
|
|
(#offset! @injection.content 0 2 0 -2)
|
|
(#set! injection.language "javascript"))
|
|
|
|
; Script with other languages
|
|
((comment
|
|
name: (_) @_name
|
|
(#eq? @_name "lang")
|
|
value: (_) @injection.language)
|
|
.
|
|
(_
|
|
(script) @injection.content
|
|
(#offset! @injection.content 0 2 0 -2)))
|