diff --git a/build.zig b/build.zig index b67031e..f0d8d51 100644 --- a/build.zig +++ b/build.zig @@ -14,7 +14,10 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - const tree_sitter_host_dep = b.dependency("tree_sitter", .{}); + const tree_sitter_host_dep = b.dependency("tree_sitter", .{ + .target = b.graph.host, + .optimize = optimize, + }); const cbor_dep = b.dependency("cbor", .{ .target = target, @@ -23,11 +26,8 @@ pub fn build(b: *std.Build) void { const ts_bin_query_gen = b.addExecutable(.{ .name = "ts_bin_query_gen", - .root_module = b.createModule(.{ - .root_source_file = b.path("src/ts_bin_query_gen.zig"), - .target = b.graph.host, - .optimize = .Debug, - }), + .target = b.graph.host, + .root_source_file = b.path("src/ts_bin_query_gen.zig"), }); ts_bin_query_gen.linkLibC(); ts_bin_query_gen.root_module.addImport("cbor", cbor_dep.module("cbor")); @@ -110,7 +110,6 @@ pub fn build(b: *std.Build) void { ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "nvim-treesitter/queries/commonlisp/highlights.scm"); ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "nvim-treesitter/queries/latex/highlights.scm"); ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "nvim-treesitter/queries/hcl/highlights.scm"); - ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "nvim-treesitter/queries/rst/highlights.scm"); ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "queries/cmake/injections.scm"); ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "tree-sitter-astro/queries/injections.scm"); @@ -149,7 +148,6 @@ pub fn build(b: *std.Build) void { ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "nvim-treesitter/queries/commonlisp/injections.scm"); ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "nvim-treesitter/queries/latex/injections.scm"); ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "nvim-treesitter/queries/hcl/injections.scm"); - ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "nvim-treesitter/queries/rst/injections.scm"); const syntax_mod = b.addModule("syntax", .{ .root_source_file = b.path("src/syntax.zig"), diff --git a/build.zig.zon b/build.zig.zon index 4b99238..d96221e 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,17 +1,17 @@ .{ .name = .flow_syntax, - .version = "0.6.0", + .version = "0.1.0", .fingerprint = 0x3ba2584ea1cec85f, - .minimum_zig_version = "0.15.0", + .minimum_zig_version = "0.14.1", .dependencies = .{ .tree_sitter = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-3cfb01c2f3349791a500f59bcc89b867d017d5b8/source.tar.gz", - .hash = "tree_sitter-0.22.4-150-g7e3f5726-z0LhyI7XuS7mSbx26jCz5VkJ_c1oL8vvC6WBgx0Idkpg", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/zig-0.14-36eca46fdfe00a53056c8d84e1628f55a25048bb/source.tar.gz", + .hash = "N-V-__8AAMF_rS6BaLxN8oA8RJ8DUNN8xZr5718FlLxN-fFO", }, .cbor = .{ - .url = "git+https://github.com/neurocyte/cbor?ref=master#7d2eeb68c8a2fb3f4d6baad6cc04c521b92974c0", - .hash = "cbor-1.0.0-RcQE_AswAQAPlqBCZXYQf9DZXn-0Ubt8Mk03ZcJWcsAG", + .url = "https://github.com/neurocyte/cbor/archive/1fccb83c70cd84e1dff57cc53f7db8fb99909a94.tar.gz", + .hash = "cbor-1.0.0-RcQE_HvqAACcrLH7t3IDZOshgY2xqJA_UX330MvwSepb", }, }, .paths = .{ diff --git a/src/file_type.zig b/src/file_type.zig index 212c6ff..bcc28fa 100644 --- a/src/file_type.zig +++ b/src/file_type.zig @@ -85,7 +85,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/file_types.zig b/src/file_types.zig index 8bd7055..294d8b8 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", "smd"}, + .extensions = .{"md"}, .comment = "