2023-02-25 19:40:08 -05:00
|
|
|
; Preprocs
|
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
|
|
|
(preproc_file_line) @keyword.directive
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
; Namespaces
|
|
|
|
|
(program_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
|
|
|
(name) @module)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
(end_program_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
|
|
|
(name) @module)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
(module_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
|
|
|
(name) @module)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
(end_module_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
|
|
|
(name) @module)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
(submodule_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
|
|
|
(name) @module)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
(end_submodule_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
|
|
|
(name) @module)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
; Includes
|
2021-04-17 20:42:17 +02:00
|
|
|
[
|
2023-02-25 19:40:08 -05:00
|
|
|
"import"
|
|
|
|
|
"include"
|
|
|
|
|
"use"
|
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.import
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
(import_statement
|
|
|
|
|
","
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"all"
|
|
|
|
|
"none"
|
|
|
|
|
] @keyword)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
; Attributes
|
|
|
|
|
[
|
|
|
|
|
(none)
|
|
|
|
|
"implicit"
|
|
|
|
|
"intent"
|
|
|
|
|
] @attribute
|
|
|
|
|
|
|
|
|
|
(implicit_statement
|
|
|
|
|
"type" @attribute)
|
|
|
|
|
|
|
|
|
|
; Keywords
|
|
|
|
|
[
|
|
|
|
|
"attributes"
|
|
|
|
|
"associate"
|
|
|
|
|
"block"
|
|
|
|
|
"classis"
|
|
|
|
|
"contains"
|
|
|
|
|
"default"
|
|
|
|
|
"dimension"
|
|
|
|
|
"endassociate"
|
|
|
|
|
"endselect"
|
|
|
|
|
"enumerator"
|
|
|
|
|
"equivalence"
|
|
|
|
|
"extends"
|
|
|
|
|
"goto"
|
|
|
|
|
"intrinsic"
|
|
|
|
|
"non_intrinsic"
|
|
|
|
|
"namelist"
|
|
|
|
|
"parameter"
|
|
|
|
|
"quiet"
|
|
|
|
|
"rank"
|
|
|
|
|
"save"
|
|
|
|
|
"selectcase"
|
|
|
|
|
"selectrank"
|
|
|
|
|
"selecttype"
|
|
|
|
|
"sequence"
|
|
|
|
|
"stop"
|
|
|
|
|
"target"
|
|
|
|
|
"typeis"
|
|
|
|
|
] @keyword
|
|
|
|
|
|
2024-04-23 12:23:15 -07:00
|
|
|
[
|
|
|
|
|
"class"
|
|
|
|
|
"enum"
|
|
|
|
|
"endenum"
|
|
|
|
|
"type"
|
|
|
|
|
"endtype"
|
|
|
|
|
"module"
|
|
|
|
|
"endmodule"
|
|
|
|
|
"submodule"
|
|
|
|
|
"endsubmodule"
|
|
|
|
|
"interface"
|
|
|
|
|
"endinterface"
|
|
|
|
|
] @keyword.type
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(default) @keyword
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
; Types
|
2024-01-06 15:05:50 +09:00
|
|
|
(type_name) @type
|
2023-02-25 19:40:08 -05:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(intrinsic_type) @type.builtin
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
; Qualifiers
|
|
|
|
|
[
|
|
|
|
|
"abstract"
|
2021-06-27 10:29:58 +05:30
|
|
|
"allocatable"
|
2023-02-25 19:40:08 -05:00
|
|
|
"automatic"
|
|
|
|
|
"constant"
|
|
|
|
|
"contiguous"
|
|
|
|
|
"data"
|
|
|
|
|
"deferred"
|
2021-06-27 10:29:58 +05:30
|
|
|
"device"
|
2023-02-25 19:40:08 -05:00
|
|
|
"external"
|
|
|
|
|
"family"
|
|
|
|
|
"final"
|
|
|
|
|
"generic"
|
2021-04-17 20:42:17 +02:00
|
|
|
"global"
|
|
|
|
|
"grid_global"
|
2021-06-27 10:29:58 +05:30
|
|
|
"host"
|
2023-02-25 19:40:08 -05:00
|
|
|
"initial"
|
|
|
|
|
"local"
|
|
|
|
|
"local_init"
|
|
|
|
|
"managed"
|
|
|
|
|
"nopass"
|
|
|
|
|
"non_overridable"
|
2022-10-22 16:28:16 +03:00
|
|
|
"optional"
|
2023-02-25 19:40:08 -05:00
|
|
|
"pass"
|
|
|
|
|
"pinned"
|
|
|
|
|
"pointer"
|
2022-10-22 16:28:16 +03:00
|
|
|
"private"
|
2023-02-25 19:40:08 -05:00
|
|
|
"property"
|
|
|
|
|
"protected"
|
2022-10-22 16:28:16 +03:00
|
|
|
"public"
|
2023-02-25 19:40:08 -05:00
|
|
|
"shared"
|
|
|
|
|
"static"
|
|
|
|
|
"texture"
|
2022-10-22 16:28:16 +03:00
|
|
|
"value"
|
2023-02-25 19:40:08 -05:00
|
|
|
"volatile"
|
|
|
|
|
(procedure_qualifier)
|
2024-03-08 19:09:51 +09:00
|
|
|
] @keyword.modifier
|
2022-10-22 16:28:16 +03:00
|
|
|
|
|
|
|
|
[
|
2023-02-25 19:40:08 -05:00
|
|
|
"common"
|
2021-06-27 10:29:58 +05:30
|
|
|
"in"
|
|
|
|
|
"inout"
|
|
|
|
|
"out"
|
2024-03-16 14:23:57 +09:00
|
|
|
] @keyword.modifier
|
2021-04-17 20:42:17 +02:00
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
; Labels
|
2021-04-18 02:17:56 +02:00
|
|
|
[
|
2023-02-25 19:40:08 -05:00
|
|
|
(statement_label)
|
|
|
|
|
(statement_label_reference)
|
|
|
|
|
] @label
|
2021-04-18 02:17:56 +02:00
|
|
|
|
|
|
|
|
[
|
2023-02-25 19:40:08 -05:00
|
|
|
"call"
|
2021-04-17 20:42:17 +02:00
|
|
|
"endfunction"
|
|
|
|
|
"endprogram"
|
2023-02-25 19:40:08 -05:00
|
|
|
"endprocedure"
|
2021-04-17 20:42:17 +02:00
|
|
|
"endsubroutine"
|
2021-06-27 10:29:58 +05:30
|
|
|
"function"
|
2021-06-27 17:28:00 +05:30
|
|
|
"procedure"
|
2023-02-25 19:40:08 -05:00
|
|
|
"program"
|
2021-06-27 10:29:58 +05:30
|
|
|
"subroutine"
|
2021-04-18 02:17:56 +02:00
|
|
|
] @keyword.function
|
|
|
|
|
|
|
|
|
|
[
|
2023-02-25 19:40:08 -05:00
|
|
|
"result"
|
|
|
|
|
"return"
|
|
|
|
|
] @keyword.return
|
|
|
|
|
|
|
|
|
|
; Functions
|
|
|
|
|
(function_statement
|
|
|
|
|
(name) @function)
|
|
|
|
|
|
|
|
|
|
(end_function_statement
|
|
|
|
|
(name) @function)
|
|
|
|
|
|
|
|
|
|
(subroutine_statement
|
|
|
|
|
(name) @function)
|
|
|
|
|
|
|
|
|
|
(end_subroutine_statement
|
|
|
|
|
(name) @function)
|
|
|
|
|
|
|
|
|
|
(module_procedure_statement
|
|
|
|
|
(name) @function)
|
|
|
|
|
|
|
|
|
|
(end_module_procedure_statement
|
|
|
|
|
(name) @function)
|
|
|
|
|
|
|
|
|
|
(subroutine_call
|
|
|
|
|
(identifier) @function.call)
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"character"
|
|
|
|
|
"close"
|
2021-04-18 02:17:56 +02:00
|
|
|
"bind"
|
2021-04-17 20:42:17 +02:00
|
|
|
"format"
|
2023-02-25 19:40:08 -05:00
|
|
|
"open"
|
2021-04-17 20:42:17 +02:00
|
|
|
"print"
|
|
|
|
|
"read"
|
|
|
|
|
"write"
|
2023-02-25 19:40:08 -05:00
|
|
|
] @function.builtin
|
|
|
|
|
|
|
|
|
|
; Exceptions
|
2024-01-06 15:05:50 +09:00
|
|
|
"error" @keyword.exception
|
2021-04-17 20:42:17 +02:00
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
; Conditionals
|
2021-04-17 20:42:17 +02:00
|
|
|
[
|
|
|
|
|
"else"
|
|
|
|
|
"elseif"
|
2023-02-25 19:40:08 -05:00
|
|
|
"elsewhere"
|
2021-04-17 20:42:17 +02:00
|
|
|
"endif"
|
2021-05-21 07:49:14 +05:30
|
|
|
"endwhere"
|
2021-06-27 10:29:58 +05:30
|
|
|
"if"
|
|
|
|
|
"then"
|
|
|
|
|
"where"
|
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.conditional
|
2021-04-17 20:42:17 +02:00
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
; Repeats
|
2021-04-17 20:42:17 +02:00
|
|
|
[
|
|
|
|
|
"do"
|
2023-02-25 19:40:08 -05:00
|
|
|
"concurrent"
|
2021-04-17 20:42:17 +02:00
|
|
|
"enddo"
|
2023-02-25 19:40:08 -05:00
|
|
|
"endforall"
|
2021-04-17 20:42:17 +02:00
|
|
|
"forall"
|
2021-06-27 10:29:58 +05:30
|
|
|
"while"
|
2023-02-25 19:40:08 -05:00
|
|
|
"continue"
|
|
|
|
|
"cycle"
|
|
|
|
|
"exit"
|
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
|
2021-04-17 20:42:17 +02:00
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
; Variables
|
|
|
|
|
(identifier) @variable
|
|
|
|
|
|
|
|
|
|
; Parameters
|
|
|
|
|
(keyword_argument
|
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
|
|
|
name: (identifier) @variable.parameter)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
(parameters
|
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.parameter)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
; Properties
|
|
|
|
|
(derived_type_member_expression
|
2024-01-10 18:05:37 +02:00
|
|
|
(type_member) @variable.member)
|
2023-02-25 19:40:08 -05:00
|
|
|
|
|
|
|
|
; Operators
|
2021-04-17 20:42:17 +02:00
|
|
|
[
|
2021-04-18 02:17:56 +02:00
|
|
|
"+"
|
|
|
|
|
"-"
|
2023-02-25 19:40:08 -05:00
|
|
|
"*"
|
|
|
|
|
"**"
|
2021-04-18 02:17:56 +02:00
|
|
|
"/"
|
|
|
|
|
"="
|
2021-04-17 20:42:17 +02:00
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
"<="
|
|
|
|
|
">="
|
|
|
|
|
"=="
|
|
|
|
|
"/="
|
2023-02-25 19:40:08 -05:00
|
|
|
"//"
|
|
|
|
|
(assumed_rank)
|
2021-04-18 02:17:56 +02:00
|
|
|
] @operator
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"\\.and\\."
|
|
|
|
|
"\\.or\\."
|
2023-02-25 19:40:08 -05:00
|
|
|
"\\.eqv\\."
|
|
|
|
|
"\\.neqv\\."
|
2021-04-18 02:17:56 +02:00
|
|
|
"\\.lt\\."
|
|
|
|
|
"\\.gt\\."
|
|
|
|
|
"\\.le\\."
|
2023-02-25 19:40:08 -05:00
|
|
|
"\\.ge\\."
|
2021-04-18 02:17:56 +02:00
|
|
|
"\\.eq\\."
|
2023-02-25 19:40:08 -05:00
|
|
|
"\\.ne\\."
|
|
|
|
|
"\\.not\\."
|
2021-04-17 20:42:17 +02:00
|
|
|
] @keyword.operator
|
|
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
; Punctuation
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"["
|
|
|
|
|
"]"
|
|
|
|
|
] @punctuation.bracket
|
2021-04-18 02:17:56 +02:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"("
|
|
|
|
|
")"
|
|
|
|
|
] @punctuation.bracket
|
2021-05-21 07:49:14 +05:30
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"<<<"
|
|
|
|
|
">>>"
|
|
|
|
|
] @punctuation.bracket
|
2021-05-21 07:49:14 +05:30
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
(array_literal
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"(/"
|
|
|
|
|
"/)"
|
|
|
|
|
] @punctuation.bracket)
|
2021-05-21 07:49:14 +05:30
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
[
|
|
|
|
|
":"
|
|
|
|
|
","
|
|
|
|
|
"/"
|
|
|
|
|
"%"
|
|
|
|
|
"::"
|
|
|
|
|
"=>"
|
|
|
|
|
] @punctuation.delimiter
|
2021-04-18 02:17:56 +02:00
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
; Literals
|
|
|
|
|
(string_literal) @string
|
2021-05-21 07:49:14 +05:30
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
(number_literal) @number
|
2021-05-21 07:49:14 +05:30
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
(boolean_literal) @boolean
|
2021-05-21 07:49:14 +05:30
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
(null_literal) @constant.builtin
|
2021-04-18 02:17:56 +02:00
|
|
|
|
2023-02-25 19:40:08 -05:00
|
|
|
; Comments
|
|
|
|
|
(comment) @comment @spell
|
|
|
|
|
|
2023-03-02 08:06:35 -05:00
|
|
|
((comment) @comment.documentation
|
|
|
|
|
(#lua-match? @comment.documentation "^!>"))
|