Skip to content

Commit b43d338

Browse files
committed
chore: update queries
1 parent d17e9d5 commit b43d338

File tree

2 files changed

+27
-36
lines changed

2 files changed

+27
-36
lines changed

after/queries/http/highlights.scm

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
; Keywords
2-
3-
(scheme) @namespace
2+
(scheme) @module
43

54
; Methods
6-
7-
(method) @method
5+
(method) @function.method
86

97
; Constants
10-
118
(const_spec) @constant
129

1310
; Headers
14-
1511
(header
1612
name: (name) @constant)
1713

1814
; Variables
19-
2015
(variable_declaration
2116
name: (identifier) @variable)
2217

@@ -30,20 +25,23 @@
3025
value: (string) @string)
3126

3227
; Fields
33-
34-
(pair name: (identifier) @field)
28+
(pair
29+
name: (identifier) @variable.member)
3530

3631
; URL / Host
37-
(host) @text.uri
38-
(host (identifier) @text.uri)
39-
(path (identifier) @text.uri)
32+
(host) @string.special.url
4033

41-
; Parameters
34+
(host
35+
(identifier) @string.special.url)
4236

43-
(query_param (key) @parameter)
37+
(path
38+
(identifier) @string.special.url)
4439

45-
; Operators
40+
; Parameters
41+
(query_param
42+
(key) @variable.parameter)
4643

44+
; Operators
4745
[
4846
"="
4947
"?"
@@ -53,8 +51,7 @@
5351
] @operator
5452

5553
; Literals
56-
57-
(target_url) @text.uri
54+
(target_url) @string.special.url
5855

5956
(http_version) @constant
6057

@@ -65,22 +62,16 @@
6562
(boolean) @boolean
6663

6764
; Punctuation
68-
69-
[ "{{" "}}" ] @punctuation.bracket
70-
7165
[
72-
":"
73-
] @punctuation.delimiter
66+
"{{"
67+
"}}"
68+
] @punctuation.bracket
7469

75-
; external JSON body
70+
":" @punctuation.delimiter
7671

72+
; external JSON body
7773
(external_body
78-
file_path: (path) @text.uri)
74+
file_path: (path) @string.special.path)
7975

8076
; Comments
81-
8277
(comment) @comment @spell
83-
84-
; Errors
85-
86-
(ERROR) @error

after/queries/http/injections.scm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
; (comment) @comment
1+
; Comments
2+
((comment) @injection.content
3+
(#set! injection.language "comment"))
24

35
; Body
4-
56
((json_body) @injection.content
6-
(#set! injection.language "json"))
7+
(#set! injection.language "json"))
78

89
((xml_body) @injection.content
9-
(#set! injection.language "xml"))
10+
(#set! injection.language "xml"))
1011

1112
((graphql_body) @injection.content
12-
(#set! injection.language "graphql"))
13+
(#set! injection.language "graphql"))
1314

1415
; Lua scripting
15-
1616
((script_variable) @injection.content
17-
(#set! injection.language "lua"))
17+
(#set! injection.language "lua"))

0 commit comments

Comments
 (0)