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 8ae208d4cde1de56b9e5fca7a28e5d9131087702..711e2e5d48759f086097b23b57756259d12b032e 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 26cf5c207b2cd4739a33af518d5201a4c7fee262..323f58c5577f30de1ec7f4f15a4edca9a981fd9a 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 f4104a504dedca7fa6b410c2a60e001ef5ccac2e..091ddfed9d02e93702413bc80fe0fc3fac9cb167 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)