2020-12-28 12:54:18 +01:00
|
|
|
[
|
|
|
|
|
(path_mod)
|
|
|
|
|
"||"
|
|
|
|
|
"&&"
|
|
|
|
|
"="
|
|
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
"<="
|
|
|
|
|
">="
|
|
|
|
|
"+"
|
|
|
|
|
"-"
|
|
|
|
|
"*"
|
|
|
|
|
"/"
|
|
|
|
|
"!"
|
|
|
|
|
"|"
|
|
|
|
|
"^"
|
|
|
|
|
] @operator
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"_:"
|
|
|
|
|
(namespace)
|
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
|
|
|
] @module
|
2020-12-28 12:54:18 +01:00
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"UNDEF"
|
|
|
|
|
"a"
|
|
|
|
|
] @variable.builtin
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"ADD"
|
|
|
|
|
"ALL"
|
|
|
|
|
"AS"
|
|
|
|
|
"ASC"
|
|
|
|
|
"ASK"
|
|
|
|
|
"BIND"
|
|
|
|
|
"BY"
|
|
|
|
|
"CLEAR"
|
|
|
|
|
"CONSTRUCT"
|
|
|
|
|
"COPY"
|
|
|
|
|
"CREATE"
|
|
|
|
|
"DEFAULT"
|
|
|
|
|
"DELETE"
|
|
|
|
|
"DELETE DATA"
|
|
|
|
|
"DELETE WHERE"
|
|
|
|
|
"DESC"
|
|
|
|
|
"DESCRIBE"
|
|
|
|
|
"DISTINCT"
|
|
|
|
|
"DROP"
|
|
|
|
|
"EXISTS"
|
|
|
|
|
"FILTER"
|
|
|
|
|
"FROM"
|
|
|
|
|
"GRAPH"
|
|
|
|
|
"GROUP"
|
|
|
|
|
"HAVING"
|
|
|
|
|
"INSERT"
|
|
|
|
|
"INSERT DATA"
|
|
|
|
|
"INTO"
|
|
|
|
|
"LIMIT"
|
|
|
|
|
"LOAD"
|
|
|
|
|
"MINUS"
|
|
|
|
|
"MOVE"
|
|
|
|
|
"NAMED"
|
|
|
|
|
"NOT"
|
|
|
|
|
"OFFSET"
|
|
|
|
|
"OPTIONAL"
|
|
|
|
|
"ORDER"
|
|
|
|
|
"PREFIX"
|
|
|
|
|
"REDUCED"
|
|
|
|
|
"SELECT"
|
|
|
|
|
"SERVICE"
|
|
|
|
|
"SILENT"
|
|
|
|
|
"UNION"
|
|
|
|
|
"USING"
|
|
|
|
|
"VALUES"
|
|
|
|
|
"WHERE"
|
|
|
|
|
"WITH"
|
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
(string) @string
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-12-28 12:54:18 +01:00
|
|
|
(echar) @string.escape
|
|
|
|
|
|
|
|
|
|
(integer) @number
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-12-28 12:54:18 +01:00
|
|
|
[
|
|
|
|
|
(decimal)
|
|
|
|
|
(double)
|
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
|
|
|
] @number.float
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-12-28 12:54:18 +01:00
|
|
|
(boolean_literal) @boolean
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"BASE"
|
|
|
|
|
"PREFIX"
|
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"ABS"
|
|
|
|
|
"AVG"
|
|
|
|
|
"BNODE"
|
|
|
|
|
"BOUND"
|
|
|
|
|
"CEIL"
|
|
|
|
|
"CONCAT"
|
|
|
|
|
"COALESCE"
|
|
|
|
|
"CONTAINS"
|
|
|
|
|
"DATATYPE"
|
|
|
|
|
"DAY"
|
|
|
|
|
"ENCODE_FOR_URI"
|
|
|
|
|
"FLOOR"
|
|
|
|
|
"HOURS"
|
|
|
|
|
"IF"
|
|
|
|
|
"IRI"
|
|
|
|
|
"LANG"
|
|
|
|
|
"LANGMATCHES"
|
|
|
|
|
"LCASE"
|
|
|
|
|
"MD5"
|
|
|
|
|
"MINUTES"
|
|
|
|
|
"MONTH"
|
|
|
|
|
"NOW"
|
|
|
|
|
"RAND"
|
|
|
|
|
"REGEX"
|
|
|
|
|
"ROUND"
|
|
|
|
|
"SECONDS"
|
|
|
|
|
"SHA1"
|
|
|
|
|
"SHA256"
|
|
|
|
|
"SHA384"
|
|
|
|
|
"SHA512"
|
|
|
|
|
"STR"
|
|
|
|
|
"SUM"
|
|
|
|
|
"MAX"
|
|
|
|
|
"MIN"
|
|
|
|
|
"SAMPLE"
|
|
|
|
|
"GROUP_CONCAT"
|
|
|
|
|
"SEPARATOR"
|
|
|
|
|
"COUNT"
|
|
|
|
|
"STRAFTER"
|
|
|
|
|
"STRBEFORE"
|
|
|
|
|
"STRDT"
|
|
|
|
|
"STRENDS"
|
|
|
|
|
"STRLANG"
|
|
|
|
|
"STRLEN"
|
|
|
|
|
"STRSTARTS"
|
|
|
|
|
"STRUUID"
|
|
|
|
|
"TIMEZONE"
|
|
|
|
|
"TZ"
|
|
|
|
|
"UCASE"
|
|
|
|
|
"URI"
|
|
|
|
|
"UUID"
|
|
|
|
|
"YEAR"
|
|
|
|
|
"isBLANK"
|
|
|
|
|
"isIRI"
|
|
|
|
|
"isLITERAL"
|
|
|
|
|
"isNUMERIC"
|
|
|
|
|
"isURI"
|
|
|
|
|
"sameTerm"
|
|
|
|
|
] @function.builtin
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"."
|
|
|
|
|
","
|
|
|
|
|
";"
|
|
|
|
|
] @punctuation.delimiter
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"("
|
|
|
|
|
")"
|
|
|
|
|
"["
|
|
|
|
|
"]"
|
|
|
|
|
"{"
|
|
|
|
|
"}"
|
|
|
|
|
(nil)
|
|
|
|
|
(anon)
|
|
|
|
|
] @punctuation.bracket
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"IN"
|
2024-01-06 15:05:50 +09:00
|
|
|
("NOT"
|
|
|
|
|
"IN")
|
2020-12-28 12:54:18 +01:00
|
|
|
] @keyword.operator
|
|
|
|
|
|
2023-09-13 00:25:01 +09:00
|
|
|
(comment) @comment @spell
|
2020-12-28 12:54:18 +01:00
|
|
|
|
|
|
|
|
; Could this be summarized?
|
2024-01-06 15:05:50 +09:00
|
|
|
(select_clause
|
2020-12-28 12:54:18 +01:00
|
|
|
[
|
|
|
|
|
bound_variable: (var)
|
|
|
|
|
"*"
|
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
|
|
|
] @variable.parameter)
|
2020-12-28 12:54:18 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(bind
|
|
|
|
|
bound_variable: (var) @variable.parameter)
|
2020-12-28 12:54:18 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(data_block
|
|
|
|
|
bound_variable: (var) @variable.parameter)
|
|
|
|
|
|
|
|
|
|
(group_condition
|
|
|
|
|
bound_variable: (var) @variable.parameter)
|
|
|
|
|
|
|
|
|
|
(iri_reference
|
|
|
|
|
[
|
|
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
] @module)
|
2020-12-28 12:54:18 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(lang_tag) @type
|
2020-12-28 12:54:18 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(rdf_literal
|
|
|
|
|
"^^" @type
|
2024-03-21 20:44:35 +09:00
|
|
|
datatype: (_
|
|
|
|
|
[
|
|
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
(namespace)
|
|
|
|
|
] @type) @type)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
|
|
|
|
(function_call
|
|
|
|
|
identifier: (_) @function)
|
|
|
|
|
|
|
|
|
|
(function_call
|
2024-03-21 20:44:35 +09:00
|
|
|
identifier: (iri_reference
|
|
|
|
|
[
|
|
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
] @function))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
|
|
|
|
(function_call
|
2024-03-21 20:44:35 +09:00
|
|
|
identifier: (prefixed_name
|
|
|
|
|
(namespace) @function))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
|
|
|
|
(base_declaration
|
|
|
|
|
(iri_reference
|
|
|
|
|
[
|
|
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
] @variable))
|
|
|
|
|
|
|
|
|
|
(prefix_declaration
|
|
|
|
|
(iri_reference
|
|
|
|
|
[
|
|
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
] @variable))
|
2020-12-28 12:54:18 +01:00
|
|
|
|
|
|
|
|
[
|
|
|
|
|
(var)
|
|
|
|
|
(blank_node_label)
|
|
|
|
|
(iri_reference)
|
|
|
|
|
(prefixed_name)
|
|
|
|
|
] @variable
|