nvim-treesitter/queries/capnp/highlights.scm

142 lines
1.5 KiB
Scheme
Raw Normal View History

2023-02-21 02:13:55 -05:00
; Preproc
2023-01-23 03:00:32 -05:00
(unique_id) @preproc
2023-01-28 07:19:47 -05:00
(top_level_annotation_body) @preproc
2023-01-23 03:00:32 -05:00
; Includes
[
"import"
"$import"
"embed"
] @include
(import_path) @string
2023-02-21 02:13:55 -05:00
; Builtins
2023-01-23 03:00:32 -05:00
[
2023-02-21 02:13:55 -05:00
(primitive_type)
"List"
] @type.builtin
2023-01-23 03:00:32 -05:00
; Typedefs
(type_definition) @type.definition
; Labels (@number, @number!)
(field_version) @label
; Methods
(annotation_definition_identifier) @method
2023-01-23 03:00:32 -05:00
(method_identifier) @method
; Fields
(field_identifier) @field
; Properties
(property) @property
2023-01-23 03:00:32 -05:00
; Parameters
(param_identifier) @parameter
(return_identifier) @parameter
; Constants
(const_identifier) @constant
(local_const) @constant
2023-01-23 03:00:32 -05:00
(enum_member) @constant
(void) @constant.builtin
2023-01-23 03:00:32 -05:00
; Types
(enum_identifier) @type
(extend_type) @type
(type_identifier) @type
; Attributes
(annotation_identifier) @attribute
(attribute) @attribute
2023-01-23 03:00:32 -05:00
; Operators
[
; @ ! -
"="
] @operator
; Keywords
2023-02-21 02:13:55 -05:00
[
"annotation"
"enum"
"group"
"interface"
"struct"
"union"
] @keyword
2023-01-23 03:00:32 -05:00
[
"extends"
"namespace"
"using"
(annotation_target)
2023-01-23 03:00:32 -05:00
] @keyword
; Literals
2023-02-21 02:13:55 -05:00
[
(string)
(concatenated_string)
(block_text)
(namespace)
] @string
(escape_sequence) @string.escape
2023-01-23 03:00:32 -05:00
(data_string) @string.special
(number) @number
(float) @float
(boolean) @boolean
; Misc
[
"const"
] @type.qualifier
[
"*"
"$"
2023-02-21 02:13:55 -05:00
":"
2023-01-23 03:00:32 -05:00
] @punctuation.special
["{" "}"] @punctuation.bracket
["(" ")"] @punctuation.bracket
["[" "]"] @punctuation.bracket
[
","
";"
"->"
] @punctuation.delimiter
(data_hex) @symbol
2023-01-23 03:00:32 -05:00
; Comments
(comment) @comment @spell