From a9263daee9413c5eff3c1f1bebcd224442fd8685 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 2 Aug 2026 17:38:06 -0300 Subject: vrsite: toggle repository file list --- vrsite/highlight_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vrsite/highlight_test.go') diff --git a/vrsite/highlight_test.go b/vrsite/highlight_test.go index b565785..e6897d1 100644 --- a/vrsite/highlight_test.go +++ b/vrsite/highlight_test.go @@ -45,6 +45,13 @@ var samples = []struct { // .h goes to the C++ grammar, but c.scm's patterns still have to reach it {"a.h", "// note\ntemplate struct Box { T v; };\n", map[string]string{"template": "keyword", "struct": "keyword", "// note": "comment", "T": "type"}}, + // zig names types by casing rather than by node, so Point and MAX are the + // query's two #match? heuristics rather than anything the grammar reports + {"a.zig", "// note\nconst std = @import(\"std\");\nconst Point = struct { x: u8 };\n" + + "pub fn main() !void {\n const MAX: u8 = 1;\n std.debug.print(\"hi\", .{ .x = MAX });\n}\n", + map[string]string{"const": "keyword", `"hi"`: "string", "// note": "comment", + "main": "function", "@import": "function", "u8": "type", "Point": "type", + "MAX": "constant", "x": "property"}}, {"a.json", "{\n \"a\": \"hi\",\n \"b\": 12\n}\n", map[string]string{`"hi"`: "string", `"a"`: "string-special", "12": "number"}}, {"a.sh", "# note\nif true; then\n ls -l \"$dir\"\nfi\n", -- cgit v1.3