2024-01-06 15:05:50 +09:00
|
|
|
; Identifiers
|
2022-10-09 23:58:05 -05:00
|
|
|
(identifier) @variable
|
2022-05-24 13:12:29 -05:00
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
; ;; If you want type highlighting based on Julia naming conventions (this might collide with mathematical notation)
|
|
|
|
|
; ((identifier) @type
|
|
|
|
|
; (match? @type "^[A-Z][^_]")) ; exception: Highlight `A_foo` sort of identifiers as variables
|
2023-07-24 13:51:05 -05:00
|
|
|
(quote_expression
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
":" @string.special.symbol
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
(identifier)
|
|
|
|
|
(operator)
|
|
|
|
|
] @string.special.symbol)
|
2022-10-09 23:58:05 -05:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(field_expression
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
(identifier) @variable.member .)
|
2020-11-09 20:05:34 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; calls
|
2020-11-09 20:05:34 +01:00
|
|
|
(call_expression
|
2022-07-24 19:34:06 -03:00
|
|
|
(identifier) @function.call)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(call_expression
|
2024-01-06 15:05:50 +09:00
|
|
|
(field_expression
|
|
|
|
|
(identifier) @function.call .))
|
2022-10-09 23:58:05 -05:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(broadcast_call_expression
|
2022-07-24 19:34:06 -03:00
|
|
|
(identifier) @function.call)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(broadcast_call_expression
|
2024-01-06 15:05:50 +09:00
|
|
|
(field_expression
|
|
|
|
|
(identifier) @function.call .))
|
2022-10-09 23:58:05 -05:00
|
|
|
|
2023-12-22 21:24:04 +11:00
|
|
|
(binary_expression
|
|
|
|
|
(_)
|
|
|
|
|
(operator) @_pipe
|
|
|
|
|
(identifier) @function.call
|
2024-03-20 17:37:03 +11:00
|
|
|
(#any-of? @_pipe "|>" ".|>"))
|
2023-12-22 21:24:04 +11:00
|
|
|
|
2024-04-14 07:23:46 -05:00
|
|
|
(macro_identifier) @function.macro
|
|
|
|
|
|
|
|
|
|
(macro_identifier
|
|
|
|
|
(identifier) @function.macro) ; for any one using the variable highlight
|
|
|
|
|
|
|
|
|
|
(macro_definition
|
|
|
|
|
(signature
|
|
|
|
|
(call_expression
|
|
|
|
|
.
|
|
|
|
|
(identifier) @function.macro)))
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Builtins
|
2023-03-09 19:53:18 -05:00
|
|
|
((identifier) @function.builtin
|
2024-02-23 17:42:01 +09:00
|
|
|
(#any-of? @function.builtin
|
|
|
|
|
"_abstracttype" "_apply_iterate" "_apply_pure" "_call_in_world" "_call_in_world_total"
|
|
|
|
|
"_call_latest" "_equiv_typedef" "_expr" "_primitivetype" "_setsuper!" "_structtype" "_typebody!"
|
|
|
|
|
"_typevar" "applicable" "apply_type" "arrayref" "arrayset" "arraysize" "const_arrayref"
|
|
|
|
|
"donotdelete" "fieldtype" "get_binding_type" "getfield" "ifelse" "invoke" "isa" "isdefined"
|
|
|
|
|
"modifyfield!" "nfields" "replacefield!" "set_binding_type!" "setfield!" "sizeof" "svec"
|
|
|
|
|
"swapfield!" "throw" "tuple" "typeassert" "typeof"))
|
2022-10-09 23:58:05 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Types
|
|
|
|
|
; Definitions
|
2022-02-07 16:16:58 -05:00
|
|
|
(abstract_definition
|
2022-12-27 04:27:22 -05:00
|
|
|
name: (identifier) @type.definition) @keyword
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(primitive_definition
|
2022-12-27 04:27:22 -05:00
|
|
|
name: (identifier) @type.definition) @keyword
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(struct_definition
|
|
|
|
|
name: (identifier) @type)
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(type_clause
|
|
|
|
|
[
|
|
|
|
|
(identifier) @type
|
|
|
|
|
(field_expression
|
|
|
|
|
(identifier) @type .)
|
|
|
|
|
])
|
2020-11-09 20:05:34 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Annotations
|
2022-12-27 04:27:22 -05:00
|
|
|
(parametrized_type_expression
|
|
|
|
|
(_) @type
|
2024-01-06 15:05:50 +09:00
|
|
|
(curly_expression
|
|
|
|
|
(_) @type))
|
2020-11-09 20:05:34 +01:00
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(type_parameter_list
|
|
|
|
|
(identifier) @type)
|
|
|
|
|
|
|
|
|
|
(typed_expression
|
|
|
|
|
(identifier) @type .)
|
|
|
|
|
|
2024-04-14 07:23:46 -05:00
|
|
|
(unary_typed_expression
|
|
|
|
|
(identifier) @type .)
|
2022-10-09 23:58:05 -05:00
|
|
|
|
|
|
|
|
(where_clause
|
2022-12-27 04:27:22 -05:00
|
|
|
(identifier) @type)
|
2023-03-09 19:53:08 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(where_clause
|
|
|
|
|
(curly_expression
|
|
|
|
|
(_) @type))
|
|
|
|
|
|
|
|
|
|
; Builtins
|
|
|
|
|
; This list was generated with:
|
|
|
|
|
;
|
|
|
|
|
; istype(x) = typeof(x) === DataType || typeof(x) === UnionAll
|
|
|
|
|
; get_types(m) = filter(x -> istype(Base.eval(m, x)), names(m))
|
|
|
|
|
; type_names = sort(union(get_types(Core), get_types(Base)))
|
|
|
|
|
;
|
2023-03-09 19:53:18 -05:00
|
|
|
((identifier) @type.builtin
|
2024-01-05 03:19:54 +09:00
|
|
|
(#any-of? @type.builtin
|
2024-02-23 17:42:01 +09:00
|
|
|
"AbstractArray" "AbstractChannel" "AbstractChar" "AbstractDict" "AbstractDisplay"
|
|
|
|
|
"AbstractFloat" "AbstractIrrational" "AbstractLock" "AbstractMatch" "AbstractMatrix"
|
|
|
|
|
"AbstractPattern" "AbstractRange" "AbstractSet" "AbstractSlices" "AbstractString"
|
|
|
|
|
"AbstractUnitRange" "AbstractVecOrMat" "AbstractVector" "Any" "ArgumentError" "Array"
|
|
|
|
|
"AssertionError" "Atomic" "BigFloat" "BigInt" "BitArray" "BitMatrix" "BitSet" "BitVector" "Bool"
|
|
|
|
|
"BoundsError" "By" "CanonicalIndexError" "CapturedException" "CartesianIndex" "CartesianIndices"
|
|
|
|
|
"Cchar" "Cdouble" "Cfloat" "Channel" "Char" "Cint" "Cintmax_t" "Clong" "Clonglong" "Cmd" "Colon"
|
|
|
|
|
"ColumnSlices" "Complex" "ComplexF16" "ComplexF32" "ComplexF64" "ComposedFunction"
|
|
|
|
|
"CompositeException" "ConcurrencyViolationError" "Condition" "Cptrdiff_t" "Cshort" "Csize_t"
|
|
|
|
|
"Cssize_t" "Cstring" "Cuchar" "Cuint" "Cuintmax_t" "Culong" "Culonglong" "Cushort" "Cvoid"
|
|
|
|
|
"Cwchar_t" "Cwstring" "DataType" "DenseArray" "DenseMatrix" "DenseVecOrMat" "DenseVector" "Dict"
|
|
|
|
|
"DimensionMismatch" "Dims" "DivideError" "DomainError" "EOFError" "Enum" "ErrorException"
|
|
|
|
|
"Exception" "ExponentialBackOff" "Expr" "Float16" "Float32" "Float64" "Function" "GlobalRef"
|
|
|
|
|
"HTML" "IO" "IOBuffer" "IOContext" "IOStream" "IdDict" "IndexCartesian" "IndexLinear"
|
|
|
|
|
"IndexStyle" "InexactError" "InitError" "Int" "Int128" "Int16" "Int32" "Int64" "Int8" "Integer"
|
|
|
|
|
"InterruptException" "InvalidStateException" "Irrational" "KeyError" "LazyString" "LinRange"
|
|
|
|
|
"LineNumberNode" "LinearIndices" "LoadError" "Lt" "MIME" "Matrix" "Method" "MethodError"
|
|
|
|
|
"Missing" "MissingException" "Module" "NTuple" "NamedTuple" "Nothing" "Number" "Ordering"
|
|
|
|
|
"OrdinalRange" "OutOfMemoryError" "OverflowError" "Pair" "ParseError" "PartialQuickSort" "Perm"
|
|
|
|
|
"PermutedDimsArray" "Pipe" "ProcessFailedException" "Ptr" "QuoteNode" "Rational" "RawFD"
|
|
|
|
|
"ReadOnlyMemoryError" "Real" "ReentrantLock" "Ref" "Regex" "RegexMatch" "Returns"
|
|
|
|
|
"ReverseOrdering" "RoundingMode" "RowSlices" "SegmentationFault" "Set" "Signed" "Slices" "Some"
|
|
|
|
|
"SpinLock" "StackFrame" "StackOverflowError" "StackTrace" "Stateful" "StepRange" "StepRangeLen"
|
|
|
|
|
"StridedArray" "StridedMatrix" "StridedVecOrMat" "StridedVector" "String" "StringIndexError"
|
|
|
|
|
"SubArray" "SubString" "SubstitutionString" "Symbol" "SystemError" "Task" "TaskFailedException"
|
|
|
|
|
"Text" "TextDisplay" "Timer" "Tmstruct" "Tuple" "Type" "TypeError" "TypeVar" "UInt" "UInt128"
|
|
|
|
|
"UInt16" "UInt32" "UInt64" "UInt8" "UndefInitializer" "UndefKeywordError" "UndefRefError"
|
|
|
|
|
"UndefVarError" "Union" "UnionAll" "UnitRange" "Unsigned" "Val" "VecElement" "VecOrMat" "Vector"
|
|
|
|
|
"VersionNumber" "WeakKeyDict" "WeakRef"))
|
2023-03-09 19:53:18 -05:00
|
|
|
|
2023-03-09 19:53:08 -05:00
|
|
|
((identifier) @variable.builtin
|
|
|
|
|
(#any-of? @variable.builtin "begin" "end")
|
|
|
|
|
(#has-ancestor? @variable.builtin index_expression))
|
|
|
|
|
|
|
|
|
|
((identifier) @variable.builtin
|
|
|
|
|
(#any-of? @variable.builtin "begin" "end")
|
|
|
|
|
(#has-ancestor? @variable.builtin range_expression))
|
2022-10-09 23:58:05 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Keywords
|
2020-11-09 20:05:34 +01:00
|
|
|
[
|
2022-12-14 03:06:08 -05:00
|
|
|
"global"
|
|
|
|
|
"local"
|
2020-11-09 20:05:34 +01:00
|
|
|
] @keyword
|
|
|
|
|
|
2022-11-06 11:03:23 +01:00
|
|
|
(compound_statement
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"begin"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword)
|
|
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(quote_statement
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"quote"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword)
|
|
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(let_statement
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"let"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword)
|
2022-10-09 23:58:05 -05:00
|
|
|
|
|
|
|
|
(if_statement
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"if"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword.conditional)
|
|
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(elseif_clause
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
"elseif" @keyword.conditional)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(else_clause
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
"else" @keyword.conditional)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-01-23 03:14:30 -05:00
|
|
|
(if_clause
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
"if" @keyword.conditional) ; `if` clause in comprehensions
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(ternary_expression
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"?"
|
|
|
|
|
":"
|
|
|
|
|
] @keyword.conditional.ternary)
|
2022-10-09 23:58:05 -05:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(try_statement
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"try"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword.exception)
|
|
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(finally_clause
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
"finally" @keyword.exception)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(catch_clause
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
"catch" @keyword.exception)
|
2022-10-09 23:58:05 -05:00
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(for_statement
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"for"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword.repeat)
|
|
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(while_statement
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"while"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword.repeat)
|
|
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(for_clause
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
"for" @keyword.repeat)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-04-17 13:59:37 -05:00
|
|
|
(for_binding
|
|
|
|
|
"outer" @keyword.repeat)
|
|
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
[
|
|
|
|
|
(break_statement)
|
|
|
|
|
(continue_statement)
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
] @keyword.repeat
|
2022-10-09 23:58:05 -05:00
|
|
|
|
|
|
|
|
(module_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"module"
|
|
|
|
|
"baremodule"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword.import)
|
|
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(import_statement
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"import"
|
|
|
|
|
"using"
|
|
|
|
|
] @keyword.import)
|
|
|
|
|
|
2023-02-02 23:12:23 -05:00
|
|
|
(import_alias
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
"as" @keyword.import)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(export_statement
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
"export" @keyword.import)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-12-28 17:57:49 +11:00
|
|
|
(selected_import
|
|
|
|
|
":" @punctuation.delimiter)
|
2022-10-09 23:58:05 -05:00
|
|
|
|
2023-09-09 01:01:10 +08:00
|
|
|
(struct_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"struct"
|
|
|
|
|
"end"
|
2024-04-23 12:23:15 -07:00
|
|
|
] @keyword.type)
|
2023-09-09 01:01:10 +08:00
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(macro_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"macro"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword)
|
2022-10-09 23:58:05 -05:00
|
|
|
|
|
|
|
|
(function_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"function"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword.function)
|
|
|
|
|
|
2020-11-09 20:05:34 +01:00
|
|
|
(do_clause
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"do"
|
|
|
|
|
"end"
|
|
|
|
|
] @keyword.function)
|
|
|
|
|
|
2022-10-09 23:58:05 -05:00
|
|
|
(return_statement
|
|
|
|
|
"return" @keyword.return)
|
2020-11-09 20:05:34 +01:00
|
|
|
|
2022-11-20 14:41:51 +02:00
|
|
|
[
|
|
|
|
|
"const"
|
|
|
|
|
"mutable"
|
2024-03-08 19:09:51 +09:00
|
|
|
] @keyword.modifier
|
2022-11-20 14:41:51 +02:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Operators & Punctuation
|
2023-03-09 19:52:39 -05:00
|
|
|
[
|
|
|
|
|
"="
|
|
|
|
|
"∈"
|
|
|
|
|
(operator)
|
|
|
|
|
] @operator
|
2022-02-07 16:16:58 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(adjoint_expression
|
|
|
|
|
"'" @operator)
|
|
|
|
|
|
|
|
|
|
(range_expression
|
|
|
|
|
":" @operator)
|
2020-11-09 20:05:34 +01:00
|
|
|
|
2022-12-27 04:27:22 -05:00
|
|
|
((operator) @keyword.operator
|
|
|
|
|
(#any-of? @keyword.operator "in" "isa"))
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(for_binding
|
|
|
|
|
"in" @keyword.operator)
|
|
|
|
|
|
|
|
|
|
(where_clause
|
|
|
|
|
"where" @keyword.operator)
|
2022-12-27 04:27:22 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(where_expression
|
|
|
|
|
"where" @keyword.operator)
|
2022-12-27 04:27:22 -05:00
|
|
|
|
2023-03-09 19:52:39 -05:00
|
|
|
[
|
|
|
|
|
","
|
|
|
|
|
"."
|
|
|
|
|
";"
|
|
|
|
|
"::"
|
|
|
|
|
"->"
|
|
|
|
|
] @punctuation.delimiter
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
"..." @punctuation.special
|
2022-04-15 17:15:51 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"("
|
|
|
|
|
")"
|
|
|
|
|
"["
|
|
|
|
|
"]"
|
|
|
|
|
"{"
|
|
|
|
|
"}"
|
|
|
|
|
] @punctuation.bracket
|
|
|
|
|
|
|
|
|
|
; Literals
|
2022-12-23 04:34:24 -05:00
|
|
|
(boolean_literal) @boolean
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-04-15 17:15:51 -05:00
|
|
|
(integer_literal) @number
|
2024-01-06 15:05:50 +09:00
|
|
|
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
(float_literal) @number.float
|
2022-04-15 17:15:51 -05:00
|
|
|
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
((identifier) @number.float
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @number.float "NaN" "NaN16" "NaN32" "Inf" "Inf16" "Inf32"))
|
2022-04-15 17:15:51 -05:00
|
|
|
|
|
|
|
|
((identifier) @constant.builtin
|
|
|
|
|
(#any-of? @constant.builtin "nothing" "missing"))
|
|
|
|
|
|
|
|
|
|
(character_literal) @character
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-04-15 17:15:51 -05:00
|
|
|
(escape_sequence) @string.escape
|
|
|
|
|
|
|
|
|
|
(string_literal) @string
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-04-15 17:15:51 -05:00
|
|
|
(prefixed_string_literal
|
|
|
|
|
prefix: (identifier) @function.macro) @string
|
|
|
|
|
|
|
|
|
|
(command_literal) @string.special
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-04-15 17:15:51 -05:00
|
|
|
(prefixed_command_literal
|
|
|
|
|
prefix: (identifier) @function.macro) @string.special
|
|
|
|
|
|
2023-08-16 15:30:59 -05:00
|
|
|
((string_literal) @string.documentation @spell
|
2024-01-06 15:05:50 +09:00
|
|
|
.
|
|
|
|
|
[
|
|
|
|
|
(module_definition)
|
|
|
|
|
(abstract_definition)
|
|
|
|
|
(struct_definition)
|
|
|
|
|
(function_definition)
|
|
|
|
|
(assignment)
|
|
|
|
|
(const_statement)
|
|
|
|
|
])
|
2023-03-01 12:26:26 -05:00
|
|
|
|
2022-04-15 17:15:51 -05:00
|
|
|
[
|
|
|
|
|
(line_comment)
|
|
|
|
|
(block_comment)
|
2023-03-01 12:26:26 -05:00
|
|
|
] @comment @spell
|