From 6de3ac3e17a42e92d4939a9107c673bf37991507 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Sun, 9 Mar 2025 11:11:37 -0500 Subject: [PATCH] Revert "Highlight `super` and `this` as keywords in JS/TS/TSX" (#26342) Reverts zed-industries/zed#25135 This approach was not the best as explained in the response to the original PR. Likely, the better approach is to create a newer specific scope for these kinds of variables under the `@variable` prefix so that themes can control these pseudo-keywords specifically --- 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 f46db408e7..1b2e047a1e 100644 --- a/crates/languages/src/javascript/highlights.scm +++ b/crates/languages/src/javascript/highlights.scm @@ -62,8 +62,8 @@ ; Literals -(this) @keyword -(super) @keyword +(this) @variable.special +(super) @variable.special [ (null) diff --git a/crates/languages/src/tsx/highlights.scm b/crates/languages/src/tsx/highlights.scm index 5b83ec903c..6e1ced93cc 100644 --- a/crates/languages/src/tsx/highlights.scm +++ b/crates/languages/src/tsx/highlights.scm @@ -62,8 +62,8 @@ ; Literals -(this) @keyword -(super) @keyword +(this) @variable.special +(super) @variable.special [ (null) diff --git a/crates/languages/src/typescript/highlights.scm b/crates/languages/src/typescript/highlights.scm index 502957c93b..b839997863 100644 --- a/crates/languages/src/typescript/highlights.scm +++ b/crates/languages/src/typescript/highlights.scm @@ -80,8 +80,8 @@ ; Literals -(this) @keyword -(super) @keyword +(this) @variable.special +(super) @variable.special [ (null)