nvim-treesitter/queries/capnp/highlights.scm

155 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)
(top_level_annotation_body)
] @preproc
2023-01-23 03:00:32 -05:00
; Includes
[
"import"
"$import"
"embed"
"using"
2023-01-23 03:00:32 -05:00
] @include
(import_path) @string @text.uri
; Keywords
[
"annotation"
"enum"
"group"
"interface"
"struct"
"union"
"extends"
"namespace"
] @keyword
2023-01-23 03:00:32 -05:00
2023-02-21 02:13:55 -05:00
; Builtins
2023-01-23 03:00:32 -05:00
[
"const"
] @type.qualifier
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_identifier)
] @method
2023-01-23 03:00:32 -05:00
; Fields
(field_identifier) @field
; Properties
(property) @property
2023-01-23 03:00:32 -05:00
; Parameters
[
(param_identifier)
(return_identifier)
] @parameter
(annotation_target) @parameter.builtin
2023-01-23 03:00:32 -05:00
; Constants
[
(const_identifier)
(local_const)
(enum_member)
] @constant
2023-01-23 03:00:32 -05:00
(void) @constant.builtin
2023-01-23 03:00:32 -05:00
; Types
[
(enum_identifier)
(extend_type)
(type_identifier)
] @type
2023-01-23 03:00:32 -05:00
; Attributes
[
(annotation_identifier)
(attribute)
] @attribute
2023-01-23 03:00:32 -05:00
; Operators
2023-02-21 02:13:55 -05:00
"=" @operator
2023-01-23 03:00:32 -05:00
; Literals
2023-02-21 02:13:55 -05:00
[
(string)
(concatenated_string)
(block_text)
(namespace)
] @string
(namespace) @text.underline
2023-02-21 02:13:55 -05:00
(escape_sequence) @string.escape
2023-01-23 03:00:32 -05:00
(data_string) @string.special
(number) @number
(float) @float
(boolean) @boolean
(data_hex) @symbol
2023-01-23 03:00:32 -05:00
; Punctuation
2023-01-23 03:00:32 -05:00
[
"*"
"$"
2023-02-21 02:13:55 -05:00
":"
2023-01-23 03:00:32 -05:00
] @punctuation.special
["{" "}"] @punctuation.bracket
["(" ")"] @punctuation.bracket
["[" "]"] @punctuation.bracket
[
"."
2023-01-23 03:00:32 -05:00
","
";"
"->"
] @punctuation.delimiter
; Comments
(comment) @comment @spell
; Errors
(ERROR) @error