nvim-treesitter/runtime/queries/http/injections.scm

25 lines
551 B
Scheme
Raw Normal View History

; Comments
2024-01-06 15:05:50 +09:00
((comment) @injection.content
(#set! injection.language "comment"))
; Body
((json_body) @injection.content
2024-01-06 15:05:50 +09:00
(#set! injection.language "json"))
2023-08-04 14:50:28 +03:00
((xml_body) @injection.content
2024-01-06 15:05:50 +09:00
(#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"))