From 619789586421274515344827efdee8cb58090194 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 14 Jul 2025 20:40:49 +0200 Subject: [PATCH 01/15] build: update to zig-0.15.0-dev.936+fc2c1883b The last pre-writergate version. --- build.zig.zon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 70ca5d8..d8f5c7a 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,12 +6,12 @@ .dependencies = .{ .tree_sitter = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-1c3ad59bd98ee430b166054030dac4c46d641e39/source.tar.gz", - .hash = "N-V-__8AANMzUiemOR2eNnrtlMmAGHFqij6VYtDUiaFfn6Dw", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-353313ad92324f2e9edc10082ce4768d49e44e7e/source.tar.gz", + .hash = "N-V-__8AAEU0UidDMndETXNGKGW66b0yAu58jXL5dmLbOcfH", }, .cbor = .{ - .url = "https://github.com/neurocyte/cbor/archive/1fccb83c70cd84e1dff57cc53f7db8fb99909a94.tar.gz", - .hash = "cbor-1.0.0-RcQE_HvqAACcrLH7t3IDZOshgY2xqJA_UX330MvwSepb", + .url = "https://github.com/neurocyte/cbor/archive/5ea4b7319146f29bb1aa9acf65982feaba9edc3d.tar.gz", + .hash = "cbor-1.0.0-RcQE_GDyAABovyRXoYFX8zD_NVOLGDc9l5g09-W-svMR", }, }, .paths = .{ From 3c72f6596aff9555454c258dca622f6d782dbb86 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 15 Jul 2025 17:00:06 +0200 Subject: [PATCH 02/15] build: update flow-syntax for 0.15.0-dev.1034+bd97b6618 --- build.zig | 12 ++++++------ build.zig.zon | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build.zig b/build.zig index 2b3a149..e287604 100644 --- a/build.zig +++ b/build.zig @@ -14,10 +14,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - const tree_sitter_host_dep = b.dependency("tree_sitter", .{ - .target = b.graph.host, - .optimize = optimize, - }); + const tree_sitter_host_dep = b.dependency("tree_sitter", .{}); const cbor_dep = b.dependency("cbor", .{ .target = target, @@ -26,8 +23,11 @@ pub fn build(b: *std.Build) void { const ts_bin_query_gen = b.addExecutable(.{ .name = "ts_bin_query_gen", - .target = b.graph.host, - .root_source_file = b.path("src/ts_bin_query_gen.zig"), + .root_module = b.createModule(.{ + .root_source_file = b.path("src/ts_bin_query_gen.zig"), + .target = target, + .optimize = optimize, + }), }); ts_bin_query_gen.linkLibC(); ts_bin_query_gen.root_module.addImport("cbor", cbor_dep.module("cbor")); diff --git a/build.zig.zon b/build.zig.zon index d8f5c7a..218a167 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,12 +6,12 @@ .dependencies = .{ .tree_sitter = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-353313ad92324f2e9edc10082ce4768d49e44e7e/source.tar.gz", - .hash = "N-V-__8AAEU0UidDMndETXNGKGW66b0yAu58jXL5dmLbOcfH", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-f1f032d24f621e2ee4deab1c424d3bf9fb809f6e/source.tar.gz", + .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyN88UicDHlr22vQnOZ3DW9NWN1gOhDwLuCRXvrh2", }, .cbor = .{ - .url = "https://github.com/neurocyte/cbor/archive/5ea4b7319146f29bb1aa9acf65982feaba9edc3d.tar.gz", - .hash = "cbor-1.0.0-RcQE_GDyAABovyRXoYFX8zD_NVOLGDc9l5g09-W-svMR", + .url = "git+https://github.com/neurocyte/cbor#6eccce0b984296e7d05c20d83933cb31530e4fac", + .hash = "cbor-1.0.0-RcQE_N3yAADXjbyvhsmTQ6lf22l1nYgePq5FT8NaC4ic", }, }, .paths = .{ From 167a588dee12ec8aa9f604f62507778d7c22cc7e Mon Sep 17 00:00:00 2001 From: Loris Cro Date: Thu, 17 Jul 2025 11:57:58 +0200 Subject: [PATCH 03/15] update to zig 0.15.0-dev.1048+f43f89a70 --- build.zig | 4 ++-- build.zig.zon | 2 +- src/file_type.zig | 2 +- src/syntax.zig | 8 ++++---- src/treez_dummy.zig | 4 ++-- src/ts_bin_query_gen.zig | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build.zig b/build.zig index e287604..4251ae1 100644 --- a/build.zig +++ b/build.zig @@ -25,8 +25,8 @@ pub fn build(b: *std.Build) void { .name = "ts_bin_query_gen", .root_module = b.createModule(.{ .root_source_file = b.path("src/ts_bin_query_gen.zig"), - .target = target, - .optimize = optimize, + .target = b.graph.host, + .optimize = .Debug, }), }); ts_bin_query_gen.linkLibC(); diff --git a/build.zig.zon b/build.zig.zon index 218a167..5d8194d 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -2,7 +2,7 @@ .name = .flow_syntax, .version = "0.1.0", .fingerprint = 0x3ba2584ea1cec85f, - .minimum_zig_version = "0.14.1", + .minimum_zig_version = "0.15.0-dev.1048+f43f89a70", .dependencies = .{ .tree_sitter = .{ diff --git a/src/file_type.zig b/src/file_type.zig index 88a1494..9faa6fa 100644 --- a/src/file_type.zig +++ b/src/file_type.zig @@ -87,7 +87,7 @@ fn ft_func_name(comptime lang: []const u8) []const u8 { return &func_name; } -pub const LangFn = *const fn () callconv(.C) ?*const treez.Language; +pub const LangFn = *const fn () callconv(.c) ?*const treez.Language; pub const FirstLineMatch = struct { prefix: ?[]const u8 = null, diff --git a/src/syntax.zig b/src/syntax.zig index bd67ccf..cb54b08 100644 --- a/src/syntax.zig +++ b/src/syntax.zig @@ -45,12 +45,12 @@ pub fn create(file_type: FileType, allocator: std.mem.Allocator, query_cache: *Q return self; } -pub fn static_create_file_type(allocator: std.mem.Allocator, lang_name: []const u8, query_cache: *QueryCache) !*Self { +pub fn create_file_type_static(allocator: std.mem.Allocator, lang_name: []const u8, query_cache: *QueryCache) !*Self { const file_type = FileType.get_by_name_static(lang_name) orelse return error.NotFound; return create(file_type, allocator, query_cache); } -pub fn static_create_guess_file_type_static(allocator: std.mem.Allocator, content: []const u8, file_path: ?[]const u8, query_cache: *QueryCache) !*Self { +pub fn create_guess_file_type_static(allocator: std.mem.Allocator, content: []const u8, file_path: ?[]const u8, query_cache: *QueryCache) !*Self { const file_type = FileType.guess_static(file_path, content) orelse return error.NotFound; return create(file_type, allocator, query_cache); } @@ -98,7 +98,7 @@ pub fn refresh_from_buffer(self: *Self, buffer: anytype, metrics: anytype) !void const input: Input = .{ .payload = &state, .read = struct { - fn read(payload: ?*anyopaque, _: u32, position: treez.Point, bytes_read: *u32) callconv(.C) [*:0]const u8 { + fn read(payload: ?*anyopaque, _: u32, position: treez.Point, bytes_read: *u32) callconv(.c) [*:0]const u8 { const ctx: *State = @ptrCast(@alignCast(payload orelse return "")); const result = ctx.buffer.get_from_pos(.{ .row = position.row, .col = position.column }, &ctx.result_buf, ctx.metrics); bytes_read.* = @intCast(result.len); @@ -124,7 +124,7 @@ pub fn refresh_from_string(self: *Self, content: [:0]const u8) !void { const input: Input = .{ .payload = &state, .read = struct { - fn read(payload: ?*anyopaque, _: u32, position: treez.Point, bytes_read: *u32) callconv(.C) [*:0]const u8 { + fn read(payload: ?*anyopaque, _: u32, position: treez.Point, bytes_read: *u32) callconv(.c) [*:0]const u8 { bytes_read.* = 0; const ctx: *State = @ptrCast(@alignCast(payload orelse return "")); const pos = (find_line_begin(ctx.content, position.row) orelse return "") + position.column; diff --git a/src/treez_dummy.zig b/src/treez_dummy.zig index b73b1f4..bee4c42 100644 --- a/src/treez_dummy.zig +++ b/src/treez_dummy.zig @@ -23,12 +23,12 @@ pub const InputEncoding = enum(c_uint) { }; pub const Input = extern struct { payload: ?*anyopaque, - read: ?*const fn (payload: ?*anyopaque, byte_index: u32, position: Point, bytes_read: *u32) callconv(.C) [*:0]const u8, + read: ?*const fn (payload: ?*anyopaque, byte_index: u32, position: Point, bytes_read: *u32) callconv(.c) [*:0]const u8, encoding: InputEncoding, }; pub const Language = struct { var dummy: @This() = .{}; - pub fn LangFn() callconv(.C) ?*const Language { + pub fn LangFn() callconv(.c) ?*const Language { return &dummy; } }; diff --git a/src/ts_bin_query_gen.zig b/src/ts_bin_query_gen.zig index e32c6ef..2584921 100644 --- a/src/ts_bin_query_gen.zig +++ b/src/ts_bin_query_gen.zig @@ -91,7 +91,7 @@ const FileType = struct { highlights: [:0]const u8, injections: ?[:0]const u8, }; -const LangFn = *const fn () callconv(.C) ?*const treez.Language; +const LangFn = *const fn () callconv(.c) ?*const treez.Language; fn load_file_types(comptime Namespace: type) []const FileType { comptime switch (@typeInfo(Namespace)) { From 81e397b06c3a7123cdebe201333c31c6fee30d53 Mon Sep 17 00:00:00 2001 From: Loris Cro Date: Tue, 19 Aug 2025 17:34:26 +0200 Subject: [PATCH 04/15] update to Zig 0.15.0 --- build.zig.zon | 6 +++--- src/ts_bin_query_gen.zig | 15 +++++++-------- src/ts_serializer.zig | 34 +++++++++++++++++++--------------- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 5d8194d..6ccbfb0 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -2,7 +2,7 @@ .name = .flow_syntax, .version = "0.1.0", .fingerprint = 0x3ba2584ea1cec85f, - .minimum_zig_version = "0.15.0-dev.1048+f43f89a70", + .minimum_zig_version = "0.15.0", .dependencies = .{ .tree_sitter = .{ @@ -10,8 +10,8 @@ .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyN88UicDHlr22vQnOZ3DW9NWN1gOhDwLuCRXvrh2", }, .cbor = .{ - .url = "git+https://github.com/neurocyte/cbor#6eccce0b984296e7d05c20d83933cb31530e4fac", - .hash = "cbor-1.0.0-RcQE_N3yAADXjbyvhsmTQ6lf22l1nYgePq5FT8NaC4ic", + .url = "git+https://github.com/neurocyte/cbor?ref=master#0708420594f5af0a8289e6e1bae0ae03f011731f", + .hash = "cbor-1.0.0-RcQE_CUwAQChkeU-LO-eTSbLAdRox-wuxUGmi2nDAWri", }, }, .paths = .{ diff --git a/src/ts_bin_query_gen.zig b/src/ts_bin_query_gen.zig index 2584921..a618a58 100644 --- a/src/ts_bin_query_gen.zig +++ b/src/ts_bin_query_gen.zig @@ -25,9 +25,8 @@ pub fn main() anyerror!void { }; defer output_file.close(); - var output = std.ArrayList(u8).init(allocator); - defer output.deinit(); - const writer = output.writer(); + var output = std.Io.Writer.Allocating.init(allocator); + const writer = &output.writer; try cbor.writeMapHeader(writer, file_types.len); @@ -38,7 +37,7 @@ pub fn main() anyerror!void { try cbor.writeMapHeader(writer, if (file_type.injections) |_| 3 else 2); const highlights_in = try treez.Query.create(lang, file_type.highlights); - const ts_highlights_in: *tss.TSQuery = @alignCast(@ptrCast(highlights_in)); + const ts_highlights_in: *tss.TSQuery = @ptrCast(@alignCast(highlights_in)); const highlights_cb = try tss.toCbor(ts_highlights_in, allocator); defer allocator.free(highlights_cb); @@ -49,7 +48,7 @@ pub fn main() anyerror!void { std.log.info("file_type {s} highlights {d} bytes", .{ file_type.name, highlights_cb.len }); const errors_in = try treez.Query.create(lang, "(ERROR) @error"); - const ts_errors_in: *tss.TSQuery = @alignCast(@ptrCast(errors_in)); + const ts_errors_in: *tss.TSQuery = @ptrCast(@alignCast(errors_in)); const errors_cb = try tss.toCbor(ts_errors_in, allocator); defer allocator.free(errors_cb); @@ -61,7 +60,7 @@ pub fn main() anyerror!void { if (file_type.injections) |injections| { const injections_in = try treez.Query.create(lang, injections); - const ts_injections_in: *tss.TSQuery = @alignCast(@ptrCast(injections_in)); + const ts_injections_in: *tss.TSQuery = @ptrCast(@alignCast(injections_in)); const injections_cb = try tss.toCbor(ts_injections_in, allocator); defer allocator.free(injections_cb); @@ -73,9 +72,9 @@ pub fn main() anyerror!void { } } - try output_file.writeAll(output.items); + try output_file.writeAll(output.written()); if (verbose) - std.log.info("file_types total {d} bytes", .{output.items.len}); + std.log.info("file_types total {d} bytes", .{output.written().len}); } fn fatal(comptime format: []const u8, args: anytype) noreturn { diff --git a/src/ts_serializer.zig b/src/ts_serializer.zig index 90c5865..456842b 100644 --- a/src/ts_serializer.zig +++ b/src/ts_serializer.zig @@ -5,6 +5,7 @@ /// Yes,... it is not a public API! Here be dragons! /// const std = @import("std"); +const Io = std.Io; const cbor = @import("cbor"); const build_options = @import("build_options"); const treez = if (build_options.use_tree_sitter) @import("treez") else @import("treez_dummy.zig"); @@ -13,7 +14,7 @@ pub const Slice = extern struct { offset: u32, length: u32, - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { return cbor.writeArray(writer, self.*); } @@ -31,7 +32,7 @@ pub fn Array(T: type) type { size: u32, capacity: u32, - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { if (self.contents) |contents| { const arr: []T = @as([*]T, @ptrCast(contents))[0..self.size]; try cbor.writeValue(writer, arr); @@ -53,7 +54,7 @@ pub fn Array(T: type) type { if (T == u8) { var arr: []const u8 = undefined; if (try cbor.matchValue(iter, cbor.extract(&arr))) { - self.contents = @constCast(@ptrCast(arr.ptr)); + self.contents = @ptrCast(@constCast(arr.ptr)); self.size = @intCast(arr.len); self.capacity = @intCast(arr.len); return true; @@ -74,7 +75,7 @@ pub fn Array(T: type) type { } i += 1; } - self.contents = @constCast(@ptrCast(arr.ptr)); + self.contents = @ptrCast(@constCast(arr.ptr)); self.size = @intCast(arr.len); self.capacity = @intCast(arr.len); return true; @@ -86,7 +87,7 @@ pub const SymbolTable = extern struct { characters: Array(u8), slices: Array(Slice), - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { return cbor.writeArray(writer, self.*); } @@ -103,7 +104,7 @@ pub const PatternEntry = extern struct { pattern_index: u16, is_rooted: bool, - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { return cbor.writeArray(writer, self.*); } @@ -122,7 +123,7 @@ pub const QueryPattern = extern struct { end_byte: u32, is_non_local: bool, - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { return cbor.writeArray(writer, self.*); } @@ -140,7 +141,7 @@ pub const StepOffset = extern struct { byte_offset: u32, step_index: u16, - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { return cbor.writeArray(writer, self.*); } @@ -177,7 +178,7 @@ pub const QueryStep = extern struct { // parent_pattern_guaranteed: u1, flags16: u8, - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { return cbor.writeArray(writer, self.*); } @@ -206,7 +207,7 @@ pub const PredicateStep = extern struct { type: Type, value_id: u32, - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { return cbor.writeArray(writer, self.*); } @@ -234,7 +235,7 @@ pub const TSQuery = extern struct { // language: ?*const treez.Language, wildcard_root_pattern_count: u16, - pub fn cborEncode(self: *const @This(), writer: anytype) !void { + pub fn cborEncode(self: *const @This(), writer: *Io.Writer) !void { return cbor.writeArray(writer, self.*); } @@ -262,13 +263,14 @@ pub const TSQuery = extern struct { pub const SerializeError = error{OutOfMemory}; pub fn toCbor(query: *TSQuery, allocator: std.mem.Allocator) SerializeError![]const u8 { - var cb: std.ArrayListUnmanaged(u8) = .empty; - defer cb.deinit(allocator); - try cbor.writeValue(cb.writer(allocator), query.*); - return cb.toOwnedSlice(allocator); + var cb: Io.Writer.Allocating = .init(allocator); + defer cb.deinit(); + cbor.writeValue(&cb.writer, query.*) catch return error.OutOfMemory; + return cb.toOwnedSlice(); } pub const DeserializeError = error{ + WriteFailed, OutOfMemory, IntegerTooLarge, IntegerTooSmall, @@ -277,6 +279,8 @@ pub const DeserializeError = error{ InvalidFloatType, InvalidArrayType, InvalidPIntType, + InvalidMapType, + InvalidUnion, JsonIncompatibleType, InvalidQueryCbor, NotAnObject, From 4c0218f805ef75c379903f402bfe764da636399e Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sat, 13 Sep 2025 16:28:14 +0200 Subject: [PATCH 05/15] fix: update tree-sitter to fix missing package paths --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index dd35dbe..d0d36af 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,8 +6,8 @@ .dependencies = .{ .tree_sitter = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-69427961ef3cb40eb618dee28222fe5b21f5d0d9/source.tar.gz", - .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyEw9UidHT2GYYF5dGPZIUUjCZaJqU2GHeRAZt2OZ", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-6336e463f4182db5c9214731a6f468701c8453f0/source.tar.gz", + .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyJjkriqMCf8UfpkByt8-GdJpAEVJJeSr80P9kEcn", }, .cbor = .{ .url = "git+https://github.com/neurocyte/cbor?ref=master#0708420594f5af0a8289e6e1bae0ae03f011731f", From 05938cb0256b6028458234880bb750e0c368d750 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 25 Sep 2025 15:45:08 +0200 Subject: [PATCH 06/15] fix: update tree-sitter to fix zig-0.15 build --- build.zig.zon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index d0d36af..e0fdae9 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,12 +6,12 @@ .dependencies = .{ .tree_sitter = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-6336e463f4182db5c9214731a6f468701c8453f0/source.tar.gz", - .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyJjkriqMCf8UfpkByt8-GdJpAEVJJeSr80P9kEcn", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-1eda347ffea27cb3bf3a70b351497f0d3bc05576/source.tar.gz", + .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyJjkripTxUexgcbM6fOBWS8Qc9e83DiOUFPXjZIb", }, .cbor = .{ - .url = "git+https://github.com/neurocyte/cbor?ref=master#0708420594f5af0a8289e6e1bae0ae03f011731f", - .hash = "cbor-1.0.0-RcQE_CUwAQChkeU-LO-eTSbLAdRox-wuxUGmi2nDAWri", + .url = "git+https://github.com/neurocyte/cbor?ref=master#7d2eeb68c8a2fb3f4d6baad6cc04c521b92974c0", + .hash = "cbor-1.0.0-RcQE_AswAQAPlqBCZXYQf9DZXn-0Ubt8Mk03ZcJWcsAG", }, }, .paths = .{ From c7eb09f145436ea66812f668e710f15dfeab4245 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 29 Sep 2025 16:38:56 +0200 Subject: [PATCH 07/15] feat: update tree-sitter for new file types --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index e0fdae9..085d07b 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,8 +6,8 @@ .dependencies = .{ .tree_sitter = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-1eda347ffea27cb3bf3a70b351497f0d3bc05576/source.tar.gz", - .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyJjkripTxUexgcbM6fOBWS8Qc9e83DiOUFPXjZIb", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-af8fddd21cc54cb926b6f5dadc5de39c6ac44e8a/source.tar.gz", + .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyFPlripdO8wKSeLT2cqtQo_PQnNS3Wi5UUHIpOQu", }, .cbor = .{ .url = "git+https://github.com/neurocyte/cbor?ref=master#7d2eeb68c8a2fb3f4d6baad6cc04c521b92974c0", From 0221af1286fc419c2fb1caedd9b5f445254d7129 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 29 Sep 2025 18:10:07 +0200 Subject: [PATCH 08/15] fix: update tree-sitter to fix paths --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 085d07b..eab9253 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,8 +6,8 @@ .dependencies = .{ .tree_sitter = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-af8fddd21cc54cb926b6f5dadc5de39c6ac44e8a/source.tar.gz", - .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyFPlripdO8wKSeLT2cqtQo_PQnNS3Wi5UUHIpOQu", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-8eb32d5f5667cf09c496815aa10fd7b5c18f6770/source.tar.gz", + .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyM-JrS7PZ_7L9KSqdvZQcFZo-0G6kZCQVgo63d4_", }, .cbor = .{ .url = "git+https://github.com/neurocyte/cbor?ref=master#7d2eeb68c8a2fb3f4d6baad6cc04c521b92974c0", From 35c356a867f4ede949cd1f6fa07aa0980fc49148 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 10 Oct 2025 08:49:27 +0200 Subject: [PATCH 09/15] fix: add missing verilog file extensions --- src/file_types.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file_types.zig b/src/file_types.zig index 294d8b8..c0c8467 100644 --- a/src/file_types.zig +++ b/src/file_types.zig @@ -558,7 +558,7 @@ pub const swift = .{ pub const verilog = .{ .description = "SystemVerilog", - .extensions = .{ "sv", "svh" }, + .extensions = .{ "sv", "svh", "v", "vh" }, .comment = "//", .highlights = "nvim-treesitter/queries/verilog/highlights.scm", .injections = "nvim-treesitter/queries/verilog/injections.scm", From 45d79d41562f3d9dcc53c7e2c38d7d829a2b2834 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 10 Oct 2025 09:10:06 +0200 Subject: [PATCH 10/15] feat: update tree-sitter for newer rust grammar --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index eab9253..2f1aede 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,8 +6,8 @@ .dependencies = .{ .tree_sitter = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-8eb32d5f5667cf09c496815aa10fd7b5c18f6770/source.tar.gz", - .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyM-JrS7PZ_7L9KSqdvZQcFZo-0G6kZCQVgo63d4_", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-026db2b0aeca1227e448e3cbe4fe36604c60944a/source.tar.gz", + .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyBxvsy4r2lzI5i5Zfg2fEwXJcOxGaDRU6zfp_ceV", }, .cbor = .{ .url = "git+https://github.com/neurocyte/cbor?ref=master#7d2eeb68c8a2fb3f4d6baad6cc04c521b92974c0", From 9106b13b4c98b145229ad643e7869f29c7b0816b Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 15 Oct 2025 11:29:58 +0200 Subject: [PATCH 11/15] fix: add smd extention to the markdown file type --- src/file_types.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file_types.zig b/src/file_types.zig index c0c8467..6d3ac12 100644 --- a/src/file_types.zig +++ b/src/file_types.zig @@ -325,7 +325,7 @@ pub const markdown = .{ .description = "Markdown", .color = 0x000000, .icon = "󰍔", - .extensions = .{"md"}, + .extensions = .{"md", "smd"}, .comment = "