From e7474cebc50915fd03f8ac905469bcbd97d4d01b Mon Sep 17 00:00:00 2001 From: Gaauwe Rombouts Date: Mon, 5 Jan 2026 12:13:19 +0100 Subject: [PATCH] typescript: Use @type instead of @type.builtin in highlights (#46068) Closes #45251 In https://github.com/zed-industries/zed/pull/44532 the syntax highlighting of JS/TS was improved, but we only used `type.builtin` for a specific case. This resulted in less consistent syntax highlighting. Not all themes have this specific token and we don't use `type.builtin` in other places either, so while this is a little less specific it is more consistent. Release Notes: - Improved syntax highlighting consistency for builtins in JavaScript and TypeScript --- crates/languages/src/javascript/highlights.scm | 4 ++-- crates/languages/src/tsx/highlights.scm | 4 ++-- crates/languages/src/typescript/highlights.scm | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/languages/src/javascript/highlights.scm b/crates/languages/src/javascript/highlights.scm index d13db50e2e..cb94f24ea2 100644 --- a/crates/languages/src/javascript/highlights.scm +++ b/crates/languages/src/javascript/highlights.scm @@ -4,9 +4,9 @@ (call_expression function: (member_expression - object: (identifier) @type.builtin + object: (identifier) @type (#any-of? - @type.builtin + @type "Promise" "Array" "Object" diff --git a/crates/languages/src/tsx/highlights.scm b/crates/languages/src/tsx/highlights.scm index 83ed6d18d7..9a265b0f79 100644 --- a/crates/languages/src/tsx/highlights.scm +++ b/crates/languages/src/tsx/highlights.scm @@ -4,9 +4,9 @@ (call_expression function: (member_expression - object: (identifier) @type.builtin + object: (identifier) @type (#any-of? - @type.builtin + @type "Promise" "Array" "Object" diff --git a/crates/languages/src/typescript/highlights.scm b/crates/languages/src/typescript/highlights.scm index f5736f4271..2e26e25bf7 100644 --- a/crates/languages/src/typescript/highlights.scm +++ b/crates/languages/src/typescript/highlights.scm @@ -4,9 +4,9 @@ (call_expression function: (member_expression - object: (identifier) @type.builtin + object: (identifier) @type (#any-of? - @type.builtin + @type "Promise" "Array" "Object"