nvim-treesitter/queries/unison/highlights.scm
Tavish Pegram 9d637b7ae8
Feat: Add unison (#5340)
* Add unison

* Trivial change to force prepush hook

* Undo change

* PR Feedback - remove appended text in query after variable, update lockfile, remove main branch specification in parser

* Replacing captures with only ones in the contributing.md

* Fix typo

* Generate from grammar

* First group of suggested changes

* Update gt operator

* Remove outer parens

* Remove maybe.c

* Add comment injection
2023-09-03 15:05:18 -04:00

73 lines
959 B
Scheme

;; Primitives
(comment) @comment @spell
(nat) @number
(unit) @constant.builtin
(literal_char) @character
(literal_text) @string
(literal_boolean) @boolean
;; Keywords
[
(kw_forall)
(unique_kw)
(type_kw)
(do)
(kw_let)
] @keyword
(kw_equals) @keyword.operator
(structural_kw) @type.qualifier
(unique) @type.qualifier
(type_constructor) @constructor
(doc_block) @comment.documentation
[
(operator)
(pipe)
(arrow_symbol)
">"
(or)
] @keyword.operator
[
"if"
"else"
"then"
(match)
(with)
(cases)
] @conditional
(blank_pattern) @variable.builtin
(pattern) @variable (constructor_or_variable_pattern) @type
(use_clause) @include
;; Types
(record_field name: (wordy_id) @variable type: (wordy_id) @type)
[
(type_name)
(type_signature)
(effect)
] @type
(term_definition) @variable
;; Punctuation
[
(type_signature_colon)
":"
] @punctuation.delimiter
[
"("
")"
"{"
"}"
"["
"]"
] @punctuation.bracket