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 d13db50e2ef85e25bdc5643672eb128265c58d91..cb94f24ea22195b8d5b8b20c1740d5994d06a3e2 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 83ed6d18d74f3820e27452ec093f8c6268b64e11..9a265b0f7999ce624c27f9c9d07e20b79e43fba1 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 f5736f4271f7048042b6e1634e78a10043952496..2e26e25bf793a138ee7751c4802cb30d202690ea 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"