mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
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
This commit is contained in:
parent
bb3dd60ebc
commit
c4e0f290d7
5 changed files with 35 additions and 13 deletions
|
|
@ -273,7 +273,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [hoon](https://github.com/urbit-pilled/tree-sitter-hoon) (experimental, maintained by @urbit-pilled)
|
||||
- [x] [html](https://github.com/tree-sitter/tree-sitter-html) (maintained by @TravonteD)
|
||||
- [x] [htmldjango](https://github.com/interdependence/tree-sitter-htmldjango) (experimental, maintained by @ObserverOfTime)
|
||||
- [x] [http](https://github.com/rest-nvim/tree-sitter-http) (maintained by @amaanq)
|
||||
- [x] [http](https://github.com/rest-nvim/tree-sitter-http) (maintained by @amaanq, @NTBBloodbath)
|
||||
- [x] [hurl](https://github.com/pfeiferj/tree-sitter-hurl) (maintained by @pfeiferj)
|
||||
- [x] [hyprlang](https://github.com/luckasRanarison/tree-sitter-hyprlang) (maintained by @luckasRanarison)
|
||||
- [x] [ini](https://github.com/justinmk/tree-sitter-ini) (experimental, maintained by @theHamsta)
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@
|
|||
"revision": "ea71012d3fe14dd0b69f36be4f96bdfe9155ebae"
|
||||
},
|
||||
"http": {
|
||||
"revision": "6824a247d1326079aab4fa9f9164e9319678081d"
|
||||
"revision": "e1c1085f1b36a19e82892cc1fc912cc9c968bb26"
|
||||
},
|
||||
"hurl": {
|
||||
"revision": "cd1a0ada92cc73dd0f4d7eedc162be4ded758591"
|
||||
|
|
|
|||
|
|
@ -912,9 +912,8 @@ list.http = {
|
|||
install_info = {
|
||||
url = "https://github.com/rest-nvim/tree-sitter-http",
|
||||
files = { "src/parser.c" },
|
||||
generate_requires_npm = true,
|
||||
},
|
||||
maintainers = { "@amaanq" },
|
||||
maintainers = { "@amaanq", "@NTBBloodbath" },
|
||||
}
|
||||
|
||||
list.hurl = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; Schemes
|
||||
(scheme) @type
|
||||
; Keywords
|
||||
(scheme) @module
|
||||
|
||||
; Methods
|
||||
(method) @function.method
|
||||
|
|
@ -7,13 +7,24 @@
|
|||
; Constants
|
||||
(const_spec) @constant
|
||||
|
||||
; Headers
|
||||
(header
|
||||
name: (name) @constant)
|
||||
|
||||
; Variables
|
||||
(identifier) @variable
|
||||
(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)
|
||||
|
|
@ -24,17 +35,19 @@
|
|||
"?"
|
||||
"&"
|
||||
"@"
|
||||
"<"
|
||||
] @operator
|
||||
|
||||
; Literals
|
||||
(string) @string
|
||||
|
||||
(target_url) @string.special.url
|
||||
|
||||
(http_version) @constant
|
||||
|
||||
(string) @string
|
||||
|
||||
(number) @number
|
||||
|
||||
; (boolean) @boolean
|
||||
(null) @constant.builtin
|
||||
(boolean) @boolean
|
||||
|
||||
; Punctuation
|
||||
[
|
||||
|
|
@ -44,5 +57,9 @@
|
|||
|
||||
":" @punctuation.delimiter
|
||||
|
||||
; external JSON body
|
||||
(external_body
|
||||
file_path: (path) @string.special.path)
|
||||
|
||||
; Comments
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
; 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_body) @injection.content
|
||||
; (#set! injection.language "graphql")) ; Not used as of now..
|
||||
((graphql_body) @injection.content
|
||||
(#set! injection.language "graphql"))
|
||||
|
||||
; Lua scripting
|
||||
((script_variable) @injection.content
|
||||
(#set! injection.language "lua"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue