aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/capnp/highlights.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/capnp/highlights.scm')
-rw-r--r--runtime/queries/capnp/highlights.scm141
1 files changed, 141 insertions, 0 deletions
diff --git a/runtime/queries/capnp/highlights.scm b/runtime/queries/capnp/highlights.scm
new file mode 100644
index 000000000..a48c007ed
--- /dev/null
+++ b/runtime/queries/capnp/highlights.scm
@@ -0,0 +1,141 @@
+; Preproc
+[
+ (unique_id)
+ (top_level_annotation_body)
+] @keyword.directive
+
+; Includes
+[
+ "import"
+ "$import"
+ "embed"
+ "using"
+] @keyword.import
+
+(import_path) @string.special.path
+
+; Keywords
+"extends" @keyword
+
+[
+ "struct"
+ "interface"
+ "union"
+ "enum"
+ "annotation"
+ "group"
+ "namespace"
+] @keyword.type
+
+; Builtins
+"const" @keyword.modifier
+
+[
+ (primitive_type)
+ "List"
+] @type.builtin
+
+; Typedefs
+(type_definition) @type.definition
+
+; Labels (@number, @number!)
+(field_version) @label
+
+; Methods
+[
+ (annotation_definition_identifier)
+ (method_identifier)
+] @function.method
+
+; Fields
+(field_identifier) @variable.member
+
+; Properties
+(property) @property
+
+; Parameters
+[
+ (param_identifier)
+ (return_identifier)
+] @variable.parameter
+
+(annotation_target) @variable.parameter.builtin
+
+; Constants
+[
+ (const_identifier)
+ (local_const)
+ (enum_member)
+] @constant
+
+(void) @constant.builtin
+
+; Types
+[
+ (enum_identifier)
+ (extend_type)
+ (type_identifier)
+] @type
+
+; Attributes
+[
+ (annotation_identifier)
+ (attribute)
+] @attribute
+
+; Operators
+"=" @operator
+
+; Literals
+[
+ (string)
+ (concatenated_string)
+ (block_text)
+ (namespace)
+] @string
+
+(namespace) @string.special
+
+(escape_sequence) @string.escape
+
+(data_string) @string.special
+
+(number) @number
+
+(float) @number.float
+
+(boolean) @boolean
+
+(data_hex) @string.special.symbol
+
+; Punctuation
+[
+ "*"
+ "$"
+ ":"
+] @punctuation.special
+
+[
+ "{"
+ "}"
+] @punctuation.bracket
+
+[
+ "("
+ ")"
+] @punctuation.bracket
+
+[
+ "["
+ "]"
+] @punctuation.bracket
+
+[
+ "."
+ ","
+ ";"
+ "->"
+] @punctuation.delimiter
+
+; Comments
+(comment) @comment @spell