Compare commits
No commits in common. "d5c1cd2a328ec75fd9b0feddbc9eb84b5f590939" and "7214ee0af27995753235eb254e822b61676dda49" have entirely different histories.
d5c1cd2a32
...
7214ee0af2
4 changed files with 12 additions and 17 deletions
|
@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const tree_sitter_dep = b.dependency("tree_sitter", .{
|
||||
const tree_sitter_dep = b.dependency("tree-sitter", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
.{
|
||||
.name = .flow_syntax,
|
||||
.version = "0.1.0",
|
||||
.fingerprint = 0x3ba2584ea1cec85f,
|
||||
.minimum_zig_version = "0.14.0-dev.3451+d8d2aa9af",
|
||||
.name = "flow-syntax",
|
||||
.version = "0.0.1",
|
||||
|
||||
.dependencies = .{
|
||||
.tree_sitter = .{
|
||||
.@"tree-sitter" = .{
|
||||
.url = "https://github.com/neurocyte/tree-sitter/releases/download/master-86dd4d2536f2748c5b4ea0e1e70678039a569aac/source.tar.gz",
|
||||
.hash = "N-V-__8AACablCbp-6lsRoKDEp6Xd2dHLe4AsW81blkSQxzs",
|
||||
.hash = "1220e9fba96c468283129e977767472dee00b16f356e5912431cec8f1a009b6691a2",
|
||||
},
|
||||
},
|
||||
.paths = .{
|
||||
|
|
|
@ -88,7 +88,7 @@ fn ft_func_name(comptime lang: []const u8) []const u8 {
|
|||
|
||||
const LangFn = *const fn () callconv(.C) ?*const treez.Language;
|
||||
|
||||
pub const FirstLineMatch = struct {
|
||||
const FirstLineMatch = struct {
|
||||
prefix: ?[]const u8 = null,
|
||||
content: ?[]const u8 = null,
|
||||
};
|
||||
|
@ -105,7 +105,7 @@ fn vec(comptime args: anytype) []const []const u8 {
|
|||
|
||||
fn load_file_types(comptime Namespace: type) []const FileType {
|
||||
comptime switch (@typeInfo(Namespace)) {
|
||||
.@"struct" => |info| {
|
||||
.Struct => |info| {
|
||||
var count = 0;
|
||||
for (info.decls) |_| {
|
||||
// @compileLog(decl.name, @TypeOf(@field(Namespace, decl.name)));
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
const file_type = @import("file_type.zig");
|
||||
const FirstLineMatch = file_type.FirstLineMatch;
|
||||
|
||||
pub const agda = .{
|
||||
.description = "Agda",
|
||||
.extensions = .{"agda"},
|
||||
|
@ -21,7 +18,7 @@ pub const bash = .{
|
|||
.icon = "",
|
||||
.extensions = .{ "sh", "bash", ".profile" },
|
||||
.comment = "#",
|
||||
.first_line_matches = FirstLineMatch{ .prefix = "#!", .content = "sh" },
|
||||
.first_line_matches = .{ .prefix = "#!", .content = "sh" },
|
||||
.formatter = .{ "shfmt", "--indent", "4" },
|
||||
.language_server = .{ "bash-language-server", "start" },
|
||||
};
|
||||
|
@ -256,7 +253,7 @@ pub const lua = .{
|
|||
.extensions = .{"lua"},
|
||||
.comment = "--",
|
||||
.injections = "tree-sitter-lua/queries/injections.scm",
|
||||
.first_line_matches = FirstLineMatch{ .prefix = "--", .content = "lua" },
|
||||
.first_line_matches = .{ .prefix = "--", .content = "lua" },
|
||||
.language_server = .{"lua-lsp"},
|
||||
};
|
||||
|
||||
|
@ -266,7 +263,7 @@ pub const mail = .{
|
|||
.extensions = .{ "eml", "mbox" },
|
||||
.comment = ">",
|
||||
.highlights = "tree-sitter-mail/queries/mail/highlights.scm",
|
||||
.first_line_matches = FirstLineMatch{ .prefix = "From" },
|
||||
.first_line_matches = .{ .prefix = "From" },
|
||||
};
|
||||
|
||||
pub const make = .{
|
||||
|
@ -410,7 +407,7 @@ pub const python = .{
|
|||
.icon = "",
|
||||
.extensions = .{ "py", "pyi" },
|
||||
.comment = "#",
|
||||
.first_line_matches = FirstLineMatch{ .prefix = "#!", .content = "python" },
|
||||
.first_line_matches = .{ .prefix = "#!", .content = "python" },
|
||||
.language_server = .{"pylsp"},
|
||||
};
|
||||
|
||||
|
@ -523,7 +520,7 @@ pub const xml = .{
|
|||
.extensions = .{"xml"},
|
||||
.comment = "<!--",
|
||||
.highlights = "tree-sitter-xml/queries/xml/highlights.scm",
|
||||
.first_line_matches = FirstLineMatch{ .prefix = "<?xml " },
|
||||
.first_line_matches = .{ .prefix = "<?xml " },
|
||||
.formatter = .{ "xmllint", "--format", "-" },
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue