feat: add maximum_symlink_depth and log_ignored_links config options

This commit is contained in:
CJ van den Berg 2026-02-11 14:23:29 +01:00
parent 3d58186b1a
commit 2749dea1b1
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 6 additions and 0 deletions

View file

@ -2782,6 +2782,8 @@ fn start_walker(self: *Self) void {
self.state.walk_tree = .running;
self.walker = walk_tree.start(self.allocator, self.name, walk_tree_entry_callback, walk_tree_done_callback, .{
.follow_directory_symlinks = tp.env.get().is("follow_directory_symlinks"),
.maximum_symlink_depth = @intCast(tp.env.get().num("maximum_symlink_depth")),
.log_ignored_links = tp.env.get().is("log_ignored_links"),
}) catch blk: {
self.state.walk_tree = .failed;
break :blk null;

View file

@ -91,6 +91,8 @@ dropdown_limit: usize = 12,
retain_symlinks: bool = true,
follow_directory_symlinks: bool = false,
log_ignored_links: bool = false,
maximum_symlink_depth: usize = 3,
include_files: []const u8 = "",

View file

@ -175,6 +175,8 @@ fn init(allocator: Allocator) InitError!*Self {
tp.env.get().set("lsp_verbose", conf.lsp_output == .verbose);
tp.env.get().set("follow_directory_symlinks", conf.follow_directory_symlinks);
tp.env.get().set("log_ignored_links", conf.log_ignored_links);
tp.env.get().num_set("maximum_symlink_depth", @intCast(conf.maximum_symlink_depth));
var self = try allocator.create(Self);
// don't destroy