languages: Remove duplicate keywords in JS syntax highlighting (#48460)

Gaauwe Rombouts created

Fixes an issue where syntax highlighting would be incorrect in certain
cases for JS, because of duplicate keyword definitions.

Release Notes:

- Fixed issue where certain keywords were incorrectly highlighted in JS
files

Change summary

crates/languages/src/javascript/highlights.scm | 33 ++++++++-----------
1 file changed, 14 insertions(+), 19 deletions(-)

Detailed changes

crates/languages/src/javascript/highlights.scm 🔗

@@ -243,18 +243,29 @@
 )
 
 [
+  "abstract"
   "as"
   "async"
   "await"
   "debugger"
+  "declare"
   "default"
   "delete"
   "extends"
   "get"
+  "implements"
   "in"
   "instanceof"
+  "keyof"
+  "module"
+  "namespace"
   "new"
   "of"
+  "override"
+  "private"
+  "protected"
+  "public"
+  "readonly"
   "set"
   "static"
   "target"
@@ -270,6 +281,9 @@
   "var"
   "function"
   "class"
+  "enum"
+  "interface"
+  "type"
 ] @keyword.declaration
 
 [
@@ -308,25 +322,6 @@
 
 (decorator "@" @punctuation.special)
 
-; Keywords
-
-[ "abstract"
-  "declare"
-  "enum"
-  "export"
-  "implements"
-  "interface"
-  "keyof"
-  "module"
-  "namespace"
-  "private"
-  "protected"
-  "public"
-  "type"
-  "readonly"
-  "override"
-] @keyword
-
 ; JSX elements
 (jsx_opening_element
   [