feat: add http parser

All credit goes to @NTBBloodbath.

See: https://github.com/NTBBloodbath/rest.nvim/issues/75#issuecomment-960447966

Co-authored-by: NTBBloodbath <bloodbathalchemist@protonmail.com>
This commit is contained in:
gegoune 2021-11-04 13:56:26 +02:00 committed by Stephan Seitz
parent fba03a304e
commit a93c5b80d7
2 changed files with 42 additions and 0 deletions

View file

@ -762,6 +762,15 @@ list.llvm = {
maintainers = { "@benwilliamgraham" },
}
list.http = {
install_info = {
url = "https://github.com/NTBBloodbath/tree-sitter-http",
branch = "main",
files = { "src/parser.c" },
},
maintainers = { "@NTBBloodbath" },
}
local M = {
list = list,
}

View file

@ -0,0 +1,33 @@
; Display errors
(ERROR) @error
; Comments
(comment) @comment
(request
method: (method) @keyword
url: (url) @TSURI)
(header
name: (name) @constant
value: (value))
; JSON
(json_pair
key: (_) @keyword)
(json_string) @string
(json_number) @number
(json_boolean) @boolean
(json_null) @constant
(json_escape_sequence) @TSStringEscape
(json_body) @keyword
; rest.nvim Neovim plugin specific features
(external_body
json_file: (json_file) @TSURI) @keyword