From 558003ab0b30117dd60fb7c3fbbbe9f468faf225 Mon Sep 17 00:00:00 2001 From: Karl Tryggvason Date: Thu, 25 Dec 2025 10:18:58 +0100 Subject: [PATCH 1/2] fix: typo in error --- src/http.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) } } From 16d742deab48cc27ea16d4e9fc60f9586fc24a70 Mon Sep 17 00:00:00 2001 From: Karl Tryggvason Date: Thu, 25 Dec 2025 14:45:02 +0100 Subject: [PATCH 2/2] Highlight variable declarations --- languages/http/highlights.scm | 12 +++++++++++- test/test.http | 11 ++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) 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/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