From 6cf93175bf011ca899e494376838ae147870a1eb Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Mon, 23 Jan 2023 03:00:32 -0500 Subject: feat: add capnp (#4203) --- queries/capnp/highlights.scm | 124 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 queries/capnp/highlights.scm (limited to 'queries') diff --git a/queries/capnp/highlights.scm b/queries/capnp/highlights.scm new file mode 100644 index 000000000..0f6815aa6 --- /dev/null +++ b/queries/capnp/highlights.scm @@ -0,0 +1,124 @@ +; Preproc (?) + +(unique_id) @preproc + +; Includes + +[ + "import" + "$import" + "embed" +] @include + +(import_path) @string + +; Types + +(primitive_type) @type.builtin + +[ + "annotation" + "enum" + "group" + "interface" + "List" + "struct" + "union" +] @type.builtin + +; Typedefs + +(type_definition) @type.definition + +; Labels (@number, @number!) + +(field_version) @label + +; Methods + +(method_identifier) @method + +; Fields + +(field_identifier) @field + +; Parameters + +(param_identifier) @parameter +(return_identifier) @parameter + +; Variables + +(identifier) @variable + +; Constants + +(const_identifier) @constant +(enum_member) @constant + +; Types + +(enum_identifier) @type +(extend_type) @type +(field_type) @type +(generic_identifier) @type +(type_identifier) @type + +; Attributes + +(attribute) @attribute +(annotation_identifier) @attribute + +; Operators + +[ + ; @ ! - + "=" +] @operator + +; Keywords + +[ + "extends" + "namespace" + "using" +] @keyword + +; Literals + +(string_literal) @string + +(data_string) @string.special +(namespace) @string.special + +(number) @number + +(float) @float + +(boolean) @boolean + +; Misc + +[ + "const" +] @type.qualifier + +[ + "*" +] @punctuation.special + +["{" "}"] @punctuation.bracket + +["(" ")"] @punctuation.bracket + +["[" "]"] @punctuation.bracket + +[ + "," + ";" + "->" +] @punctuation.delimiter + +; Comments + +(comment) @comment @spell -- cgit v1.3.1