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
+46 -46
View File
@@ -2,19 +2,19 @@
; Identifiers
; ============================================================
;; #FFFFFF #000000 0 0 0 1
;; #FFFFFF #000000 0 0 0 0 1
(identifier) @variable
;; #C9B4FF #000000 0 0 0 2
;; #C9B4FF #000000 0 0 0 0 2
((identifier) @constant
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
;; #F28FAD #000000 0 0 0 3
;; #F28FAD #000000 0 0 0 0 3
((identifier) @variable.builtin
(#match? @variable.builtin "^self$"))
; Attributes (generic parameters)
;; #7CD5CF #000000 0 0 0 2
;; #7CD5CF #000000 0 0 0 0 2
(variable_list
(attribute
"<" @punctuation.bracket
@@ -25,30 +25,30 @@
; Control flow & keywords
; ============================================================
;; #9AD4FF #000000 0 0 0 2
;; #9AD4FF #000000 0 0 0 0 2
"return" @keyword.return
;; #FF9E64 #000000 0 0 0 2
;; #FF9E64 #000000 0 0 0 0 2
[
"goto"
"in"
"local"
] @keyword
;; #9AD4FF #000000 0 0 0 2
;; #9AD4FF #000000 0 0 0 0 2
(label_statement) @label
;; #FF9E64 #000000 0 0 0 2
;; #FF9E64 #000000 0 0 0 0 2
(break_statement) @keyword
;; #9AD4FF #000000 0 0 0 2
;; #9AD4FF #000000 0 0 0 0 2
(do_statement
[
"do"
"end"
] @keyword)
;; #9AD4FF #000000 0 0 0 2
;; #9AD4FF #000000 0 0 0 0 2
(while_statement
[
"while"
@@ -56,14 +56,14 @@
"end"
] @repeat)
;; #9AD4FF #000000 0 0 0 2
;; #9AD4FF #000000 0 0 0 0 2
(repeat_statement
[
"repeat"
"until"
] @repeat)
;; #FFB870 #000000 0 0 0 2
;; #FFB870 #000000 0 0 0 0 2
(if_statement
[
"if"
@@ -73,7 +73,7 @@
"end"
] @conditional)
;; #9AD4FF #000000 0 0 0 2
;; #9AD4FF #000000 0 0 0 0 2
(elseif_statement
[
"elseif"
@@ -81,14 +81,14 @@
"end"
] @conditional)
;; #9AD4FF #000000 0 0 0 2
;; #9AD4FF #000000 0 0 0 0 2
(else_statement
[
"else"
"end"
] @conditional)
;; #9AD4FF #000000 0 0 0 2
;; #9AD4FF #000000 0 0 0 0 2
(for_statement
[
"for"
@@ -96,14 +96,14 @@
"end"
] @repeat)
;; #FFB870 #000000 0 0 0 2
;; #FFB870 #000000 0 0 0 0 2
(function_declaration
[
"function"
"end"
] @keyword.function)
;; #FFB870 #000000 0 0 0 2
;; #FFB870 #000000 0 0 0 0 2
(function_definition
[
"function"
@@ -114,13 +114,13 @@
; Operators
; ============================================================
;; #6BD9DF #000000 0 1 0 1
;; #6BD9DF #000000 0 1 0 0 1
(binary_expression operator: _ @operator)
;; #6BD9DF #000000 0 1 0 1
;; #6BD9DF #000000 0 1 0 0 1
(unary_expression operator: _ @operator)
;; #F29CC3 #000000 0 0 0 1
;; #F29CC3 #000000 0 0 0 0 1
[
"and"
"not"
@@ -131,7 +131,7 @@
; Punctuation
; ============================================================
;; #B6BEC8 #000000 0 0 0 1
;; #B6BEC8 #000000 0 0 0 0 1
[
";"
":"
@@ -140,7 +140,7 @@
] @punctuation.delimiter
; Brackets
;; #B6BEC8 #000000 0 0 0 1
;; #B6BEC8 #000000 0 0 0 0 1
[
"("
")"
@@ -154,13 +154,13 @@
; Tables & fields
; ============================================================
;; #9AD4FF #000000 0 0 0 1
;; #9AD4FF #000000 0 0 0 0 1
(field name: (identifier) @field)
;; #9AD4FF #000000 0 0 0 1
;; #9AD4FF #000000 0 0 0 0 1
(dot_index_expression field: (identifier) @field)
;; #7CD5CF #000000 0 0 0 1
;; #7CD5CF #000000 0 0 0 0 1
(table_constructor
[
"{"
@@ -171,10 +171,10 @@
; Functions
; ============================================================
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(parameters (identifier) @parameter)
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(function_declaration
name: [
(identifier) @function
@@ -182,12 +182,12 @@
field: (identifier) @function)
])
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(function_declaration
name: (method_index_expression
method: (identifier) @method))
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(assignment_statement
(variable_list .
name: [
@@ -198,14 +198,14 @@
(expression_list .
value: (function_definition)))
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(table_constructor
(field
name: (identifier) @function
value: (function_definition)))
; Function calls
;; #78C2FF #000000 0 0 0 2
;; #78C2FF #000000 0 0 0 0 2
(function_call
name: [
(identifier) @function.call
@@ -216,7 +216,7 @@
])
; Highlighted definitions & references
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(function_declaration
name: [
(identifier) @name
@@ -224,12 +224,12 @@
field: (identifier) @name)
]) @definition.function
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(function_declaration
name: (method_index_expression
method: (identifier) @name)) @definition.method
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(assignment_statement
(variable_list .
name: [
@@ -240,13 +240,13 @@
(expression_list .
value: (function_definition))) @definition.function
;; #FFC877 #000000 0 0 0 3
;; #FFC877 #000000 0 0 0 0 3
(table_constructor
(field
name: (identifier) @name
value: (function_definition))) @definition.function
;; #78C2FF #000000 0 0 0 2
;; #78C2FF #000000 0 0 0 0 2
(function_call
name: [
(identifier) @name
@@ -257,7 +257,7 @@
]) @reference.call
; Builtins
;; #F28FAD #000000 0 0 0 2
;; #F28FAD #000000 0 0 0 0 2
(function_call
(identifier) @function.builtin
(#match? @function.builtin "^(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawset|required|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)$"))
@@ -266,22 +266,22 @@
; Literals & constants
; ============================================================
;; #B8E986 #000000 0 0 0 5
;; #B8E986 #000000 0 0 0 0 5
(number) @number
;; #A6E3A1 #000000 0 0 0 5
;; #A6E3A1 #000000 0 0 0 0 5
(string) @string
;; #A6E3A1 #000000 0 0 0 6
;; #A6E3A1 #000000 0 0 0 0 6
(escape_sequence) @string.escape
;; #C9B4FF #000000 0 0 0 2
;; #C9B4FF #000000 0 0 0 0 2
(vararg_expression) @constant
;; #C9B4FF #000000 0 0 0 2
;; #C9B4FF #000000 0 0 0 0 2
(nil) @constant.builtin
;; #C2E8FF #000000 0 0 0 2
;; #C2E8FF #000000 0 0 0 0 2
[
(false)
(true)
@@ -291,17 +291,17 @@
; Comments & directives
; ============================================================
;; #99ADBF #000000 0 1 0 1
;; #99ADBF #000000 0 1 0 0 1
(comment) @comment
;; #7CD5CF #000000 0 0 0 1
;; #7CD5CF #000000 0 0 0 0 1
(hash_bang_line) @preproc
; ============================================================
; Injections
; ============================================================
;; #7CD5CF #000000 0 1 0 2
;; #7CD5CF #000000 0 1 0 0 2
((function_call
name: [
(identifier) @_cdef_identifier