Closed bennypowers closed 2 months ago
Closing due to tree-sitter-http v3 release. This is now possible in rest.nvim v3
Thanks. I added this query in ~/.config/nvim/after/queries/http/injections.scm
to get HTML highlighting, since i suppose i don't have the xml highlighter installed
; extends
(document
(section
(request
(header
(header_entity) @_header
(value) @_value)
(#eq? @_value "text/html")
(#match? @_header "^[cC][oO][nN][tT][eE][nN][tT]-[tT][yY][pP][eE]$")
(xml_body) @injection.content
(#set! injection.language "html"))))
Using release 2.0.1, I got:
More generally, rest.nvim may parse the mimetype in the Content-Type header and parse the request body using the associated ts parser
Originally posted by @bennypowers in https://github.com/rest-nvim/rest.nvim/issues/242#issuecomment-2119116753