summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index f4a3b542..51c4f76d 100644
--- a/build.zig
+++ b/build.zig
@@ -384,6 +384,10 @@ pub fn build(b: *std.Build) void {
const query_path = dep.path(g.query);
const query = std.Io.Dir.cwd().readFileAlloc(io, query_path.getPath(b), b.allocator, .limited(0x100000)) catch @panic("read " ++ g.name ++ " highlights");
ts_queries.addOption([]const u8, g.name ++ "_highlights", query);
+ // helix's textobject queries, vendored (vendor/queries); a
+ // grammar without one gets none
+ const objects = std.Io.Dir.cwd().readFileAlloc(io, b.pathFromRoot("vendor/queries/" ++ g.name ++ "/textobjects.scm"), b.allocator, .limited(0x100000)) catch "";
+ ts_queries.addOption([]const u8, g.name ++ "_textobjects", objects);
const lib = b.addLibrary(.{
.name = "tree-sitter-" ++ g.name,