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,33 +2,33 @@
; 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) @type
(#match? @type "^[A-Z].*[a-z]"))
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
((identifier) @constant
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
((identifier) @constant.builtin
(#match? @constant.builtin "^__[a-zA-Z0-9_]*__$"))
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
((identifier) @constant.builtin
(#match? @constant.builtin "^(NotImplemented|Ellipsis|quit|exit|copyright|credits|license)$"))
;; #FFB454 #000000 0 0 0 3
;; #FFB454 #000000 0 0 0 0 3
((assignment
left: (identifier) @type.definition
(type
(identifier) @_annotation))
(#match? @_annotation "^TypeAlias$"))
;; #FFB454 #000000 0 0 0 3
;; #FFB454 #000000 0 0 0 0 3
((assignment
left: (identifier) @type.definition
right: (call
@@ -39,20 +39,20 @@
; Function definitions
; ============================================================
;; #FFB454 #000000 0 0 0 3
;; #FFB454 #000000 0 0 0 0 3
(function_definition
name: (identifier) @function)
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(type
(identifier) @type)
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(type
(subscript
(identifier) @type))
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
((call
function: (identifier) @_isinstance
arguments: (argument_list
@@ -64,40 +64,40 @@
; Literals
; ============================================================
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
(none) @constant.builtin
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
[
(true)
(false)
] @boolean
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
(integer) @number
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
(float) @number.float
;; #99ADBF #000000 0 1 0 1
;; #99ADBF #000000 0 1 0 0 1
(comment) @comment @spell
;; #F29668 #000000 0 0 0 1
;; #F29668 #000000 0 0 0 0 1
((module
.
(comment) @keyword.directive @nospell)
(#match? @keyword.directive "^#!/"))
;; #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
[
(escape_sequence)
(escape_interpolation)
] @string.escape
;; #AAD94C #000000 0 0 0 0
;; #AAD94C #000000 0 0 0 0 0
(expression_statement
(string
(string_content) @spell) @string.documentation)
@@ -106,37 +106,37 @@
; Operators
; ============================================================
;; #FF8F40 #000000 0 0 0 1
;; #FF8F40 #000000 0 0 0 0 1
[ "if" "elif" "else" "for" "while" "break" "continue" ] @keyword.control_flow_loops
;; #FF8F40 #000000 0 0 0 1
;; #FF8F40 #000000 0 0 0 0 1
[ "def" "return" "lambda" "yield" "async" "await" ] @keyword.functions_coroutines
;; #7dcfff #000000 0 0 0 2
;; #7dcfff #000000 0 0 0 0 2
[ "class" ] @keyword.class
;; #F07178 #000000 0 0 0 1
;; #F07178 #000000 0 0 0 0 1
[ "try" "except" "finally" "raise" ] @keyword.exceptions
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
[ "with" ] @keyword.context_management
;; #7dcfff #000000 0 0 0 2
;; #7dcfff #000000 0 0 0 0 2
[ "import" "from" "exec" ] @keyword.imports_execution
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
[ "match" "case" ] @keyword.pattern_matching
;; #F07178 #000000 0 0 0 1
;; #F07178 #000000 0 0 0 0 1
[ "global" "nonlocal" ] @keyword.scope_bindings
;; #FF8F40 #000000 0 0 0 1
;; #FF8F40 #000000 0 0 0 0 1
[ "del" ] @keyword.deletion
;; #FF8F40 #000000 0 0 0 1
;; #FF8F40 #000000 0 0 0 0 1
[ "pass" "assert" "as" "print" ] @keyword.utility
;; #F29668 #000000 0 1 0 1
;; #F29668 #000000 0 1 0 0 1
[
"-"
"-="
@@ -183,7 +183,7 @@
"not in"
] @operatoroperator
;; #BFBDB6 #000000 0 0 0 1
;; #BFBDB6 #000000 0 0 0 0 1
[
","
"."
@@ -192,7 +192,7 @@
(ellipsis)
] @punctuation.delimiter
;; #BFBDB6 #000000 0 0 0 1
;; #BFBDB6 #000000 0 0 0 0 1
[
"("
")"
@@ -202,27 +202,27 @@
"}"
] @punctuation.bracket
;; #7dcfff #000000 0 0 0 2
;; #7dcfff #000000 0 0 0 0 2
(interpolation
"{" @punctuation.special
"}" @punctuation.special)
;; #7dcfff #000000 0 0 0 2
;; #7dcfff #000000 0 0 0 0 2
(format_expression
"{" @punctuation.special
"}" @punctuation.special)
;; #7dcfff #000000 0 0 0 2
;; #7dcfff #000000 0 0 0 0 2
(line_continuation) @punctuation.special
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(type_conversion) @function.macro
; ============================================================
; Builtins / Exception types
; ============================================================
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
((identifier) @type.builtin
(#match? @type.builtin
"^(BaseException|Exception|ArithmeticError|BufferError|LookupError|AssertionError|AttributeError|EOFError|FloatingPointError|GeneratorExit|ImportError|ModuleNotFoundError|IndexError|KeyError|KeyboardInterrupt|MemoryError|NameError|NotImplementedError|OSError|OverflowError|RecursionError|ReferenceError|RuntimeError|StopIteration|StopAsyncIteration|SyntaxError|IndentationError|TabError|SystemError|SystemExit|TypeError|UnboundLocalError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ValueError|ZeroDivisionError|EnvironmentError|IOError|WindowsError|BlockingIOError|ChildProcessError|ConnectionError|BrokenPipeError|ConnectionAbortedError|ConnectionRefusedError|ConnectionResetError|FileExistsError|FileNotFoundError|InterruptedError|IsADirectoryError|NotADirectoryError|PermissionError|ProcessLookupError|TimeoutError|Warning|UserWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|RuntimeWarning|FutureWarning|ImportWarning|UnicodeWarning|BytesWarning|ResourceWarning)$"))
@@ -231,56 +231,56 @@
; Function / Lambda parameters
; ============================================================
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(parameters
(identifier) @variable.parameter)
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(lambda_parameters
(identifier) @variable.parameter)
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(lambda_parameters
(tuple_pattern
(identifier) @variable.parameter))
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(keyword_argument
name: (identifier) @variable.parameter)
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(default_parameter
name: (identifier) @variable.parameter)
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(typed_parameter
(identifier) @variable.parameter)
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(typed_default_parameter
name: (identifier) @variable.parameter)
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(parameters
(list_splat_pattern
(identifier) @variable.parameter))
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(parameters
(dictionary_splat_pattern
(identifier) @variable.parameter))
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(lambda_parameters
(list_splat_pattern
(identifier) @variable.parameter))
;; #D2A6FF #000000 0 0 0 1
;; #D2A6FF #000000 0 0 0 0 1
(lambda_parameters
(dictionary_splat_pattern
(identifier) @variable.parameter))
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
((identifier) @variable.builtin
(#match? @variable.builtin "^(self|cls)$"))
@@ -288,7 +288,7 @@
; Attributes / Class members
; ============================================================
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
((attribute
attribute: (identifier) @variable.member)
(#match? @variable.member "^[%l_].*$"))
@@ -297,22 +297,22 @@
; Class definitions
; ============================================================
;; #59C2FF #000000 0 0 0 2
;; #59C2FF #000000 0 0 0 0 2
(class_definition
name: (identifier) @type)
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(class_definition
body: (block
(function_definition
name: (identifier) @function.method)))
;; #D2A6FF #000000 0 0 0 2
;; #D2A6FF #000000 0 0 0 0 2
(class_definition
superclasses: (argument_list
(identifier) @type))
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
((class_definition
body: (block
(expression_statement
@@ -320,7 +320,7 @@
left: (identifier) @variable.member))))
(#match? @variable.member "^[%l_].*$"))
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
((class_definition
body: (block
(expression_statement
@@ -329,7 +329,7 @@
(identifier) @variable.member)))))
(#match? @variable.member "^[%l_].*$"))
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
((class_definition
(block
(function_definition
@@ -340,27 +340,27 @@
; Function calls
; ============================================================
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(call
function: (identifier) @function.call)
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(call
function: (attribute
attribute: (identifier) @function.method.call))
;; #59C2FF #000000 0 0 0 3
;; #59C2FF #000000 0 0 0 0 3
((call
function: (identifier) @constructor)
(#match? @constructor "^[A-Z]"))
;; #59C2FF #000000 0 0 0 3
;; #59C2FF #000000 0 0 0 0 3
((call
function: (attribute
attribute: (identifier) @constructor))
(#match? @constructor "^[A-Z]"))
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
((call
function: (identifier) @function.builtin)
(#match? @function.builtin
@@ -382,31 +382,31 @@
; Decorators
; ============================================================
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(decorator
"@" @attribute)
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(decorator
(identifier) @attribute)
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(decorator
(attribute
attribute: (identifier) @attribute))
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(decorator
(call
(identifier) @attribute))
;; #FFB454 #000000 0 0 0 2
;; #FFB454 #000000 0 0 0 0 2
(decorator
(call
(attribute
attribute: (identifier) @attribute)))
;; #59C2FF #000000 0 0 0 3
;; #59C2FF #000000 0 0 0 0 3
((decorator
(identifier) @attribute.builtin)
(#match? @attribute.builtin "^(classmethod|property|staticmethod)$"))