summaryrefslogtreecommitdiff
path: root/src/Core.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 13:15:15 -0300
committerGabriel Schneider <[email protected]>2026-11-06 14:24:59 -0300
commitc37a700474e8b84cc3c7db8bf550b7c5f18b1871 (patch)
tree5498f5f8cf542f4aef7903c75aec56efd80c1126 /src/Core.zig
parent9991a90aae7f4591e63e5ecb0ab2467a348ed54e (diff)
downloadpardes-c37a700474e8b84cc3c7db8bf550b7c5f18b1871.tar.gz
pardes-c37a700474e8b84cc3c7db8bf550b7c5f18b1871.zip
kinds #23, the plumber: Plumb, skqrvwks's rules ported (one a line in plumb(6)'s order, the session's and kept in a dump, tried before the built-in ladder, prefix, suffix, isdir and isfile), its ports url, dir, file or any loaded kind by its name from the registry, a rule naming a kind not loaded refused in words when written and passed over like any rule that cannot make its target when its kind has gone since, so `Plumb suffix .svg to image` in init sends a look to the image addon
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Core.zig')
-rw-r--r--src/Core.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Core.zig b/src/Core.zig
index cd7b4ec5..a595e6b0 100644
--- a/src/Core.zig
+++ b/src/Core.zig
@@ -210,6 +210,9 @@ db: Db = .{},
/// (`stdio.h`, `<foo.h>`) is tried in, in order. The session's, seeded
/// with C's (/usr/include, /usr/local/include), kept in a dump.
incl: std.ArrayList([]u8) = .empty,
+/// Plumb's rules, the user's, tried in order before the built-in ones
+/// (look.resolve), the first to match taking the look. Kept in a dump.
+plumb: std.ArrayList([]u8) = .empty,
/// Zerox's groups of panes on one buffer (File.syncTwins), and the id
/// the next takes.
twin_groups: std.ArrayList(pardes.panes.File.TwinGroup) = .empty,
@@ -761,6 +764,8 @@ pub fn deinit(p: *Pardes) void {
p.recent.deinit(p.recentGpa());
for (p.incl.items) |dir| p.gpa.free(dir);
p.incl.deinit(p.gpa);
+ for (p.plumb.items) |rule| p.gpa.free(rule);
+ p.plumb.deinit(p.gpa);
for (p.twin_groups.items) |group| p.gpa.free(group.path);
p.twin_groups.deinit(p.gpa);
p.fs.batch.bytes.deinit(p.gpa);