diff --git a/build.zig b/build.zig index 13d3c18..81ce4d5 100644 --- a/build.zig +++ b/build.zig @@ -42,6 +42,7 @@ pub fn build(b: *std.Build) void { ts_queryfile(b, tree_sitter_dep, "tree-sitter-julia/queries/highlights.scm"), ts_queryfile(b, tree_sitter_dep, "tree-sitter-kdl/queries/highlights.scm"), ts_queryfile(b, tree_sitter_dep, "tree-sitter-lua/queries/highlights.scm"), + ts_queryfile(b, tree_sitter_dep, "tree-sitter-mail/queries/mail/highlights.scm"), ts_queryfile(b, tree_sitter_dep, "tree-sitter-make/queries/highlights.scm"), ts_queryfile(b, tree_sitter_dep, "tree-sitter-markdown/tree-sitter-markdown/queries/highlights.scm"), ts_queryfile(b, tree_sitter_dep, "tree-sitter-markdown/tree-sitter-markdown-inline/queries/highlights.scm"), diff --git a/build.zig.zon b/build.zig.zon index b08615b..d5171f5 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -4,8 +4,8 @@ .dependencies = .{ .@"tree-sitter" = .{ - .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-c3b0bddfbd7a12b3fe82625633019bafc0bf7959/source.tar.gz", - .hash = "1220ff3a4c4261bea6341e938626b1aa951c8e5274a59e389ef86a8e0b04744ca4f3", + .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-aea6072c6178d5cd0c97fff33e130f632f355bc2/source.tar.gz", + .hash = "12204c99c6093230023380068f386f7eb32ab83df9a8eb8b586ffe5aa44afa34ff0e", }, }, .paths = .{ diff --git a/src/file_type.zig b/src/file_type.zig index ec7c6d9..2c29935 100644 --- a/src/file_type.zig +++ b/src/file_type.zig @@ -11,6 +11,7 @@ pub const FileType = @This(); color: u24, icon: []const u8, name: []const u8, +description: []const u8, lang_fn: LangFn, extensions: []const []const u8, highlights: [:0]const u8, @@ -119,6 +120,7 @@ fn load_file_types(comptime Namespace: type) []const FileType { .color = if (@hasField(@TypeOf(args), "color")) args.color else 0xffffff, .icon = if (@hasField(@TypeOf(args), "icon")) args.icon else "󱀫", .name = lang, + .description = args.description, .lang_fn = if (@hasField(@TypeOf(args), "parser")) args.parser else get_parser(lang), .extensions = vec(args.extensions), .comment = args.comment, diff --git a/src/file_types.zig b/src/file_types.zig index 13dc274..c0b47c3 100644 --- a/src/file_types.zig +++ b/src/file_types.zig @@ -1,9 +1,11 @@ pub const agda = .{ + .description = "Agda", .extensions = .{"agda"}, .comment = "--", }; pub const bash = .{ + .description = "Bash", .color = 0x3e474a, .icon = "󱆃", .extensions = .{ "sh", "bash", ".profile" }, @@ -14,6 +16,7 @@ pub const bash = .{ }; pub const c = .{ + .description = "C", .icon = "", .extensions = .{"c"}, .comment = "//", @@ -22,6 +25,7 @@ pub const c = .{ }; pub const @"c-sharp" = .{ + .description = "C#", .color = 0x68217a, .icon = "󰌛", .extensions = .{"cs"}, @@ -30,6 +34,7 @@ pub const @"c-sharp" = .{ }; pub const conf = .{ + .description = "Config", .color = 0x000000, .icon = "", .extensions = .{ "conf", "config", ".gitconfig" }, @@ -39,6 +44,7 @@ pub const conf = .{ }; pub const cmake = .{ + .description = "CMake", .color = 0x004078, .icon = "", .extensions = .{ "CMakeLists.txt", "cmake", "cmake.in" }, @@ -50,6 +56,7 @@ pub const cmake = .{ }; pub const cpp = .{ + .description = "C++", .color = 0x9c033a, .icon = "", .extensions = .{ "cc", "cpp", "cxx", "hpp", "hxx", "h", "ipp", "ixx" }, @@ -64,6 +71,7 @@ pub const cpp = .{ }; pub const css = .{ + .description = "CSS", .color = 0x3d8fc6, .icon = "󰌜", .extensions = .{"css"}, @@ -71,11 +79,13 @@ pub const css = .{ }; pub const diff = .{ + .description = "Diff", .extensions = .{ "diff", "patch" }, .comment = "#", }; pub const dockerfile = .{ + .description = "Docker", .color = 0x019bc6, .icon = "", .extensions = .{ "Dockerfile", "dockerfile", "docker", "Containerfile", "container" }, @@ -83,6 +93,7 @@ pub const dockerfile = .{ }; pub const dtd = .{ + .description = "DTD", .icon = "󰗀", .extensions = .{"dtd"}, .comment = "