Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion languages/http/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@
; Highlight HTTP versions
(http_version) @keyword

; Highlight variables and script variables
; Highlight variable declarations (@foo=bar)
(variable_declaration
name: (identifier) @variable)
(variable_declaration
value: (string) @string)
(variable_declaration
value: (number) @number)
(variable_declaration
value: (boolean) @boolean)

; Highlight variables and script variables ({{foo}})
(variable) @variable
(script_variable) @variable.special

Expand Down
2 changes: 1 addition & 1 deletion src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl zed::Extension for HttpExtension {
_: &zed_extension_api::LanguageServerId,
_: &zed_extension_api::Worktree,
) -> zed_extension_api::Result<zed_extension_api::Command> {
Err(("Not implmented").into())
Err(("Not implemented").into())
}
}

Expand Down
11 changes: 10 additions & 1 deletion test/test.http
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Accept: application/json


### PATCH Request with XML Body
PATCH http://example.com/api/users/123
PATCH http://example.com/api/users/{{user_id}}
Content-Type: application/xml
Authorization: Bearer your_access_token_here

Expand All @@ -52,3 +52,12 @@ Authorization: Bearer your_access_token_here
<email>update@example.com</email>
<status>active</status>
</user>


###
# variables

@user_id=123
@number_variable=456
@string_variable="fooBar"
@boolean_variable=false