diff --git a/languages/http/highlights.scm b/languages/http/highlights.scm index 939fe72..a84430f 100644 --- a/languages/http/highlights.scm +++ b/languages/http/highlights.scm @@ -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 diff --git a/src/http.rs b/src/http.rs index d07e5cd..b9a206c 100644 --- a/src/http.rs +++ b/src/http.rs @@ -13,7 +13,7 @@ impl zed::Extension for HttpExtension { _: &zed_extension_api::LanguageServerId, _: &zed_extension_api::Worktree, ) -> zed_extension_api::Result { - Err(("Not implmented").into()) + Err(("Not implemented").into()) } } diff --git a/test/test.http b/test/test.http index d802fc2..eb728af 100644 --- a/test/test.http +++ b/test/test.http @@ -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 @@ -52,3 +52,12 @@ Authorization: Bearer your_access_token_here update@example.com active + + +### +# variables + +@user_id=123 +@number_variable=456 +@string_variable="fooBar" +@boolean_variable=false