summaryrefslogtreecommitdiff
path: root/vrsite/assets/cpp.scm
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-30 17:05:12 -0300
committerGabriel Schneider <[email protected]>2026-07-30 17:56:23 -0300
commit8ec4e135e318c7799b2576a8729493c063da4a97 (patch)
treeab37cdbb7f478eb996264cf941891f127f303c85 /vrsite/assets/cpp.scm
parentcb05c363045bf0e7af5858f6d7bc26f026fa9d70 (diff)
downloadnotevi-8ec4e135e318c7799b2576a8729493c063da4a97.tar.gz
notevi-8ec4e135e318c7799b2576a8729493c063da4a97.zip
Diffstat (limited to 'vrsite/assets/cpp.scm')
-rw-r--r--vrsite/assets/cpp.scm25
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)