diff options
Diffstat (limited to 'vrsite/assets/cpp.scm')
| -rw-r--r-- | vrsite/assets/cpp.scm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vrsite/assets/cpp.scm b/vrsite/assets/cpp.scm new file mode 100644 index 0000000..e939a7a --- /dev/null +++ b/vrsite/assets/cpp.scm @@ -0,0 +1,25 @@ +; C++ highlights, from tree-sitter/tree-sitter-cpp v0.23.4 +; queries/highlights.scm (MIT). A supplement loaded after c.scm, as upstream +; composes it, so these patterns win. Capture names mapped onto zed syntax +; keys; `this` gets @variable.special to match what rust.scm does for `self`. + +["catch" "class" "co_await" "co_return" "co_yield" "constexpr" "constinit" + "consteval" "delete" "explicit" "final" "friend" "mutable" "namespace" + "noexcept" "new" "override" "private" "protected" "public" "template" + "throw" "try" "typename" "using" "concept" "requires" "virtual"] @keyword + +(auto) @type +((namespace_identifier) @type + (#match? @type "^[A-Z]")) + +(call_expression function: (qualified_identifier + name: (identifier) @function)) +(template_function name: (identifier) @function) +(template_method name: (field_identifier) @function.method) +(function_declarator declarator: (qualified_identifier + name: (identifier) @function)) +(function_declarator declarator: (field_identifier) @function.method) + +(raw_string_literal) @string +(this) @variable.special +(null "nullptr" @constant) |
