Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 89 additions & 40 deletions src/cli/list_themes.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ const Preview = struct {
.x_off = x_off,
.y_off = next_start,
.width = width,
.height = 24,
.height = 28,
},
);
const bold: vaxis.Style = .{
Expand Down Expand Up @@ -1382,7 +1382,9 @@ const Preview = struct {
.{ .text = "pub ", .style = color5 },
.{ .text = "fn ", .style = color12 },
.{ .text = "main", .style = color2 },
.{ .text = "() ", .style = standard },
.{ .text = "(init: ", .style = standard },
.{ .text = "std.process.Init", .style = color12 },
.{ .text = ") ", .style = standard },
.{ .text = "!", .style = color5 },
.{ .text = "void", .style = color12 },
.{ .text = " {", .style = standard },
Expand All @@ -1395,10 +1397,11 @@ const Preview = struct {
_ = child.print(
&.{
.{ .text = " 4 │ ", .style = color238 },
.{ .text = "const ", .style = color5 },
.{ .text = "stdout ", .style = standard },
.{ .text = "=", .style = color5 },
.{ .text = " std.Io.getStdOut().writer();", .style = standard },
.{ .text = "var ", .style = color5 },
.{ .text = "buf:", .style = standard },
.{ .text = " [1024]u8", .style = color12 },
.{ .text = " =", .style = color5 },
.{ .text = " undefined;", .style = standard },
},
.{
.row_offset = 7,
Expand All @@ -1409,20 +1412,55 @@ const Preview = struct {
&.{
.{ .text = " 5 │ ", .style = color238 },
.{ .text = "var ", .style = color5 },
.{ .text = "stdout ", .style = standard },
.{ .text = "=", .style = color5 },
.{ .text = " std.Io.File.stdout().writer(init.io, &buf);", .style = standard },
},
.{
.row_offset = 8,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 6 │ ", .style = color238 },
.{ .text = "const ", .style = color5 },
.{ .text = "w ", .style = standard },
.{ .text = "=", .style = color5 },
.{ .text = " &stdout.interface;", .style = standard },
},
.{
.row_offset = 9,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 7 │", .style = color238 },
},
.{
.row_offset = 10,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 8 │ ", .style = color238 },
.{ .text = "var ", .style = color5 },
.{ .text = "i:", .style = standard },
.{ .text = " usize", .style = color12 },
.{ .text = " =", .style = color5 },
.{ .text = " 1", .style = color4 },
.{ .text = ";", .style = standard },
},
.{
.row_offset = 8,
.row_offset = 11,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 6 │ ", .style = color238 },
.{ .text = " 9 │ ", .style = color238 },
.{ .text = "while ", .style = color5 },
.{ .text = "(i ", .style = standard },
.{ .text = "<= ", .style = color5 },
Expand All @@ -1433,13 +1471,13 @@ const Preview = struct {
.{ .text = ") {", .style = standard },
},
.{
.row_offset = 9,
.row_offset = 12,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 7 │ ", .style = color238 },
.{ .text = " 10 │ ", .style = color238 },
.{ .text = "if ", .style = color5 },
.{ .text = "(i ", .style = standard },
.{ .text = "% ", .style = color5 },
Expand All @@ -1449,28 +1487,28 @@ const Preview = struct {
.{ .text = ") {", .style = standard },
},
.{
.row_offset = 10,
.row_offset = 13,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 8 │ ", .style = color238 },
.{ .text = " 11 │ ", .style = color238 },
.{ .text = "try ", .style = color5 },
.{ .text = "stdout.writeAll(", .style = standard },
.{ .text = "w.writeAll(", .style = standard },
.{ .text = "\"ZiggZagg", .style = color10 },
.{ .text = "\\n", .style = color12 },
.{ .text = "\"", .style = color10 },
.{ .text = ");", .style = standard },
},
.{
.row_offset = 11,
.row_offset = 14,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 9 │ ", .style = color238 },
.{ .text = " 12 │ ", .style = color238 },
.{ .text = "} ", .style = standard },
.{ .text = "else if ", .style = color5 },
.{ .text = "(i ", .style = standard },
Expand All @@ -1481,28 +1519,28 @@ const Preview = struct {
.{ .text = ") {", .style = standard },
},
.{
.row_offset = 12,
.row_offset = 15,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 10 │ ", .style = color238 },
.{ .text = " 13 │ ", .style = color238 },
.{ .text = "try ", .style = color5 },
.{ .text = "stdout.writeAll(", .style = standard },
.{ .text = "w.writeAll(", .style = standard },
.{ .text = "\"Zigg", .style = color10 },
.{ .text = "\\n", .style = color12 },
.{ .text = "\"", .style = color10 },
.{ .text = ");", .style = standard },
},
.{
.row_offset = 13,
.row_offset = 16,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 11 │ ", .style = color238 },
.{ .text = " 14 │ ", .style = color238 },
.{ .text = "} ", .style = standard },
.{ .text = "else if ", .style = color5 },
.{ .text = "(i ", .style = standard },
Expand All @@ -1513,76 +1551,87 @@ const Preview = struct {
.{ .text = ") {", .style = standard },
},
.{
.row_offset = 14,
.row_offset = 17,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 12 │ ", .style = color238 },
.{ .text = " 15 │ ", .style = color238 },
.{ .text = "try ", .style = color5 },
.{ .text = "stdout.writeAll(", .style = standard },
.{ .text = "w.writeAll(", .style = standard },
.{ .text = "\"Zagg", .style = color10 },
.{ .text = "\\n", .style = color12 },
.{ .text = "\"", .style = color10 },
.{ .text = ");", .style = standard },
},
.{
.row_offset = 15,
.row_offset = 18,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 13 │ ", .style = color238 },
.{ .text = " 16 │ ", .style = color238 },
.{ .text = "} ", .style = standard },
.{ .text = "else ", .style = color5 },
.{ .text = "{", .style = standard },
},
.{
.row_offset = 16,
.row_offset = 19,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 14 │ ", .style = color238 },
.{ .text = " 17 │ ", .style = color238 },
.{ .text = "try ", .style = color5 },
.{ .text = "stdout.print(\"{d}\\n\", .{i})", .style = standard_selection },
.{ .text = "w.print(\"{d}\\n\", .{i})", .style = standard_selection },
.{ .text = ";", .style = cursor },
},
.{
.row_offset = 17,
.row_offset = 20,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 15 │ ", .style = color238 },
.{ .text = " 18 │ ", .style = color238 },
.{ .text = "}", .style = standard },
},
.{
.row_offset = 18,
.row_offset = 21,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 16 │ ", .style = color238 },
.{ .text = " 19 │ ", .style = color238 },
.{ .text = "}", .style = standard },
},
.{
.row_offset = 19,
.row_offset = 22,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 17 │ ", .style = color238 },
.{ .text = " 20 │ ", .style = color238 },
.{ .text = "try ", .style = color5 },
.{ .text = "w.flush();", .style = standard },
},
.{
.row_offset = 23,
.col_offset = 2,
},
);
_ = child.print(
&.{
.{ .text = " 21 │ ", .style = color238 },
.{ .text = "}", .style = standard },
},
.{
.row_offset = 20,
.row_offset = 24,
.col_offset = 2,
},
);
Expand All @@ -1595,7 +1644,7 @@ const Preview = struct {
},
},
.{
.row_offset = 21,
.row_offset = 25,
.col_offset = 2,
},
);
Expand All @@ -1610,7 +1659,7 @@ const Preview = struct {
},
},
.{
.row_offset = 21,
.row_offset = 25,
.col_offset = col,
},
);
Expand All @@ -1624,12 +1673,12 @@ const Preview = struct {
.{ .text = " main ", .style = color4 },
.{ .text = "[+] ", .style = color1 },
.{ .text = "via ", .style = standard },
.{ .text = " v0.13.0 ", .style = color3 },
.{ .text = " v0.16.0 ", .style = color3 },
.{ .text = "via ", .style = standard },
.{ .text = " impure (ghostty-env)", .style = color4 },
},
.{
.row_offset = 22,
.row_offset = 26,
.col_offset = 2,
},
);
Expand All @@ -1641,7 +1690,7 @@ const Preview = struct {
.{ .text = "→", .style = color2 },
},
.{
.row_offset = 23,
.row_offset = 27,
.col_offset = 2,
},
);
Expand Down
Loading