diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 12:40:11 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 14:56:36 -0300 |
| commit | a864ef66736d3cfbdffed8b98a3c46be7985db74 (patch) | |
| tree | 52628bd394f32aad30dc3b7991a23bfe22e0a397 /src/lsp/Scip.zig | |
| parent | d4e7694b4fedcf532f469095fb07df60f134e9d2 (diff) | |
| download | pardes-a864ef66736d3cfbdffed8b98a3c46be7985db74.tar.gz pardes-a864ef66736d3cfbdffed8b98a3c46be7985db74.zip | |
idioms #13, the language-server client: Cx reads a file through the query's io (Io.Dir, Io.File) rather than libc open and read, notification dispatches on a stringToEnum switch, a status post too long is cut rather than dropped, failure is ?Err not ?anyerror, Rename's other files are tried rather than lost on OOM, Ask's messages are proven to fit (its buffer 160), its @put/@edit parse is a switch, query names Err, and std.fs.path is std.Io.Dir.path
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/lsp/Scip.zig')
| -rw-r--r-- | src/lsp/Scip.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lsp/Scip.zig b/src/lsp/Scip.zig index 8deffe26..3d3cc648 100644 --- a/src/lsp/Scip.zig +++ b/src/lsp/Scip.zig @@ -67,7 +67,7 @@ pub const Index = struct { } pub fn root(ix: *const Index) []const u8 { - return std.fs.path.dirname(ix.path()) orelse "/"; + return std.Io.Dir.path.dirname(ix.path()) orelse "/"; } /// The document of the file at `abs`, or null. @@ -217,7 +217,7 @@ pub fn find(io: std.Io, dir: []const u8) Error!?*Index { for (0..8) |_| { const p = std.fmt.bufPrint(&buf, "{s}/index.scip", .{if (std.mem.eql(u8, d, "/")) "" else d}) catch return null; if (statPath(io, p, .{})) |st| return try use(io, p, st) else |_| {} - d = std.fs.path.dirname(d) orelse return null; + d = std.Io.Dir.path.dirname(d) orelse return null; } return null; } |
