Add strikethrough support

This commit is contained in:
2025-12-30 10:55:32 +00:00
parent 235eafb01c
commit 26e0b06e24
40 changed files with 1197 additions and 1184 deletions

View File

@@ -2,19 +2,19 @@
; Identifiers
; ============================================================
;; #FFFFFF #000000 0 0 0 1
;; #FFFFFF #000000 0 0 0 0 1
(identifier) @variable
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
((identifier) @constant
(#match? @constant "^[A-Z_][A-Z0-9_]*$"))
;; #F07178 #000000 0 0 0 3
;; #F07178 #000000 0 0 0 0 3
((identifier) @variable.builtin
(#match? @variable.builtin
"^(arguments|console|window|document|globalThis|process|module|exports)$"))
;; #59C2FF #000000 0 0 0 1
;; #59C2FF #000000 0 0 0 0 1
((identifier) @constructor
(#match? @constructor "^[A-Z][a-zA-Z0-9]*$"))
@@ -22,21 +22,21 @@
; Properties
; ============================================================
;; #F07178 #000000 0 0 0 1
;; #F07178 #000000 0 0 0 0 1
(property_identifier) @property
; ============================================================
; Functions
; ============================================================
;; #FFB454 #000000 0 0 0 3
;; #FFB454 #000000 0 0 0 0 3
(function_declaration
name: (identifier) @function)
(function_expression
name: (identifier) @function)
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(method_definition
name: (property_identifier) @function.method)
@@ -56,11 +56,11 @@
; Function calls
; ------------------------------------------------------------
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(call_expression
function: (identifier) @function.call)
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(call_expression
function: (member_expression
property: (property_identifier) @function.method))
@@ -69,7 +69,7 @@
; Highlighted definitions & references
; ============================================================
;; #FFB454 #000000 0 0 0 3
;; #FFB454 #000000 0 0 0 0 3
(assignment_expression
left: [
(identifier) @name
@@ -79,21 +79,21 @@
right: [(arrow_function) (function_expression)]
) @definition.function
;; #FFB454 #000000 0 0 0 3
;; #FFB454 #000000 0 0 0 0 3
(pair
key: (property_identifier) @name
value: [(arrow_function) (function_expression)]) @definition.function
;; #59C2FF #000000 0 0 0 0
;; #59C2FF #000000 0 0 0 0 0
((call_expression
function: (identifier) @name) @reference.call
(#not-match? @name "^(require)$"))
;; #7dcfff #000000 0 0 0 2
;; #7dcfff #000000 0 0 0 0 2
(new_expression
constructor: (_) @name) @reference.class
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
(export_statement value: (assignment_expression left: (identifier) @name right: ([
(number)
(string)
@@ -109,7 +109,7 @@
; Parameters
; ============================================================
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(formal_parameters
[
(identifier) @variable.parameter
@@ -126,7 +126,7 @@
; Keywords (split into semantic groups)
; ============================================================
;; #FF8F40 #000000 0 0 0 1
;; #FF8F40 #000000 0 0 0 0 1
; Declarations
[
"var"
@@ -136,7 +136,7 @@
"class"
] @keyword.declaration
;; #FF8F40 #000000 0 0 0 1
;; #FF8F40 #000000 0 0 0 0 1
; Control flow
[
"if"
@@ -157,7 +157,7 @@
"extends"
] @keyword.control
;; #FF8F40 #000000 0 0 0 1
;; #FF8F40 #000000 0 0 0 0 1
; Imports / exports
[
"import"
@@ -166,7 +166,7 @@
"as"
] @keyword.import
;; #F29668 #000000 0 0 0 1
;; #F29668 #000000 0 0 0 0 1
; Operators-as-keywords
[
"in"
@@ -179,7 +179,7 @@
"yield"
] @keyword.operator
;; #FF8F40 #000000 0 0 0 1
;; #FF8F40 #000000 0 0 0 0 1
; Modifiers
[
"async"
@@ -192,11 +192,11 @@
; Literals
; ============================================================
;; #F07178 #000000 0 0 0 1
;; #F07178 #000000 0 0 0 0 1
(this) @variable.builtin
(super) @variable.builtin
;; #D2A6FF #000000 0 0 0 4
;; #D2A6FF #000000 0 0 0 0 4
[
(true)
(false)
@@ -204,27 +204,27 @@
(undefined)
] @constant.builtin
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
(number) @number
;; #D2A6FF #000000 0 1 0 2
;; #D2A6FF #000000 0 1 0 0 2
((string) @use_strict
(#match? @use_strict "^['\"]use strict['\"]$"))
;; #AAD94C #000000 0 0 0 0
;; #AAD94C #000000 0 0 0 0 0
(string) @string
;; #AAD94C #000000 0 0 0 0
;; #AAD94C #000000 0 0 0 0 0
(template_string) @string.special
;; #99ADBF #000000 0 1 0 1
;; #99ADBF #000000 0 1 0 0 1
(comment) @comment
; ============================================================
; Operators & punctuation
; ============================================================
;; #F29668 #000000 0 1 0 1
;; #F29668 #000000 0 1 0 0 1
[
"+"
"-"
@@ -271,14 +271,14 @@
"=>"
] @operator
;; #BFBDB6 #000000 0 0 0 1
;; #BFBDB6 #000000 0 0 0 0 1
[
"."
","
";"
] @punctuation.delimiter
;; #BFBDB6 #000000 0 0 0 1
;; #BFBDB6 #000000 0 0 0 0 1
[
"("
")"
@@ -288,7 +288,7 @@
"}"
] @punctuation.bracket
;; #7dcfff #000000 0 0 0 2
;; #7dcfff #000000 0 0 0 0 2
(template_substitution
"${" @punctuation.special
"}" @punctuation.special)
@@ -297,15 +297,15 @@
; JSX
; ============================================================
;; #59C2FF #000000 0 0 0 4
;; #59C2FF #000000 0 0 0 0 4
(jsx_opening_element (identifier) @tag2)
(jsx_closing_element (identifier) @tag2)
(jsx_self_closing_element (identifier) @tag2)
;; #F07178 #000000 0 0 0 3
;; #F07178 #000000 0 0 0 0 3
(jsx_attribute (property_identifier) @attribute2)
;; #BFBDB6 #000000 0 0 0 3
;; #BFBDB6 #000000 0 0 0 0 3
(jsx_opening_element (["<" ">"]) @punctuation.bracket2)
(jsx_closing_element (["</" ">"]) @punctuation.bracket2)
(jsx_self_closing_element (["<" "/>"]) @punctuation.bracket2)