nvim-treesitter/queries/http/highlights.scm
NTBBloodbath c4e0f290d7 feat(http): switch to new parser version
fix(http): use `@variable.member` for fields

fix(http): keep the comment injection

fix(http): keep `method` capture as `@function.method`

docs(README.md): update HTTP parser maintainers list

feat(http): remove redundant captures

cleanup(http): remove unneedeed highlighting captures
2024-03-18 00:46:59 +02:00

65 lines
791 B
Scheme

; Keywords
(scheme) @module
; Methods
(method) @function.method
; Constants
(const_spec) @constant
; Headers
(header
name: (name) @constant)
; Variables
(variable_declaration
name: (identifier) @variable)
; Fields
(pair
name: (identifier) @variable.member)
; URL / Host
(host) @string.special.url
(path
(identifier) @string.special.url)
; Parameters
(query_param
(key) @variable.parameter)
; Operators
[
"="
"?"
"&"
"@"
"<"
] @operator
; Literals
(target_url) @string.special.url
(http_version) @constant
(string) @string
(number) @number
(boolean) @boolean
; Punctuation
[
"{{"
"}}"
] @punctuation.bracket
":" @punctuation.delimiter
; external JSON body
(external_body
file_path: (path) @string.special.path)
; Comments
(comment) @comment @spell