feat: render diagnostics (part 1)
This commit is contained in:
parent
33dd4486eb
commit
e41c2d34f7
4 changed files with 67 additions and 14 deletions
|
@ -564,3 +564,13 @@ fn walk_filtered(dir: std.fs.Dir, allocator: std.mem.Allocator) !FilteredWalker
|
|||
.name_buffer = name_buffer,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn normalize_file_path(file_path: []const u8) []const u8 {
|
||||
const project = tp.env.get().str("project");
|
||||
if (project.len == 0) return file_path;
|
||||
if (project.len >= file_path.len) return file_path;
|
||||
if (std.mem.eql(u8, project, file_path[0..project.len]) and file_path[project.len] == std.fs.path.sep)
|
||||
return file_path[project.len + 1 ..];
|
||||
return file_path;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue