nvim-treesitter/runtime/queries/http/injections.scm
2025-05-12 18:43:40 +02:00

24 lines
551 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)
((comment
name: (_) @_name
(#eq? @_name "lang")
value: (_) @injection.language)?
.
(_
(script) @injection.content
(#offset! @injection.content 0 2 0 -2))
(#set! injection.language "javascript"))