From ebbc6a9752153488735eeaf0297eafbb4f6c3e01 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Wed, 19 Feb 2025 00:53:16 -0500 Subject: [PATCH] Highlight `super` and `this` as keywords in JS/TS/TSX (#25135) Closes #24951 We were highlighting both as `@variable.special` however, they are _techinically_ keywords and other editors (VSCode/WebStorm) seem to highlight them as keywords as well. Release Notes: - N/A --- 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 8ae208d4cd..711e2e5d48 100644 --- a/crates/languages/src/javascript/highlights.scm +++ b/crates/languages/src/javascript/highlights.scm @@ -59,8 +59,8 @@ ; Literals -(this) @variable.special -(super) @variable.special +(this) @keyword +(super) @keyword [ (null) diff --git a/crates/languages/src/tsx/highlights.scm b/crates/languages/src/tsx/highlights.scm index 26cf5c207b..323f58c557 100644 --- a/crates/languages/src/tsx/highlights.scm +++ b/crates/languages/src/tsx/highlights.scm @@ -62,8 +62,8 @@ ; Literals -(this) @variable.special -(super) @variable.special +(this) @keyword +(super) @keyword [ (null) diff --git a/crates/languages/src/typescript/highlights.scm b/crates/languages/src/typescript/highlights.scm index f4104a504d..091ddfed9d 100644 --- a/crates/languages/src/typescript/highlights.scm +++ b/crates/languages/src/typescript/highlights.scm @@ -77,8 +77,8 @@ ; Literals -(this) @variable.special -(super) @variable.special +(this) @keyword +(super) @keyword [ (null)