diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 42ff46c..ab2b11a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: - name: build run: | export PATH=./zig:$PATH - zig build + zig build -Dallocation_info FILE=zig-cache/bin/zls diff --git a/src/document_store.zig b/src/document_store.zig index e96cdaf..e661612 100644 --- a/src/document_store.zig +++ b/src/document_store.zig @@ -265,7 +265,10 @@ fn newDocument(self: *DocumentStore, uri: []const u8, text: []u8) anyerror!*Hand // This includes the last separator curr_path = curr_path[0 .. idx + 1]; - var folder = try std.fs.cwd().openDir(curr_path, .{}); + var folder = std.fs.cwd().openDir(curr_path, .{}) catch |err| switch(err) { + error.FileNotFound => continue, + else => return err, + }; defer folder.close(); // Try to open the file, read it and add the new document if we find it. diff --git a/src/main.zig b/src/main.zig index 2520e54..da72d0f 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1643,7 +1643,7 @@ pub fn main() anyerror!void { arena.state.buffer_list = .{}; if (debug_alloc) |dbg| { - std.log.notice(.main, "\n{}\n", .{dbg.info}); + std.log.debug(.main, "\n{}\n", .{dbg.info}); } } }