Skip to content

Commit c15b81f

Browse files
feat(ts): match queries to v3 parser version
1 parent 306975a commit c15b81f

File tree

4 files changed

+49
-77
lines changed

4 files changed

+49
-77
lines changed

after/queries/http/highlights.scm

Lines changed: 0 additions & 77 deletions
This file was deleted.

queries/http/highlights.scm

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
; Methods
2+
(method) @function.method
3+
4+
; Headers
5+
(header
6+
name: (_) @constant)
7+
8+
; Variables
9+
(variable_declaration
10+
name: (identifier) @variable)
11+
12+
; Parameters
13+
(query_param
14+
key: (_) @variable.parameter)
15+
16+
; Operators
17+
[
18+
"="
19+
"&"
20+
"@"
21+
"<"
22+
] @operator
23+
24+
; Literals
25+
(request
26+
url: (_) @string.special.url)
27+
28+
(http_version) @constant
29+
30+
; Response
31+
(status_code) @number
32+
(status_text) @string
33+
34+
; Punctuation
35+
[
36+
"{{"
37+
"}}"
38+
] @punctuation.bracket
39+
40+
":" @punctuation.delimiter
41+
42+
; external JSON body
43+
(external_body
44+
path: (_) @string.special.path)
45+
46+
; Comments
47+
(comment) @comment @spell
48+
(request_separator) @comment @spell
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414

1515
; Lua scripting
1616
((script) @injection.content
17+
(#offset! @injection.content 0 2 0 -2)
1718
(#set! injection.language "lua"))

0 commit comments

Comments
 (0)