feat: add support for absolute paths to LSP and formatter binaries

Also, refactor binary resolving functions into the bin_path module.

closes #474
This commit is contained in:
CJ van den Berg 2026-01-29 15:27:43 +01:00
parent d24f335465
commit 4847a1f584
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 26 additions and 18 deletions

View file

@ -1137,9 +1137,7 @@ pub fn get_theme_file_name(theme_name: []const u8) ![]const u8 {
}
fn resolve_executable(executable: [:0]const u8) [:0]const u8 {
return for (executable) |char| {
if (std.fs.path.isSep(char)) break executable;
} else bin_path.find_binary_in_path(std.heap.c_allocator, executable) catch executable orelse executable;
return bin_path.resolve_executable(std.heap.c_allocator, executable);
}
fn restart() noreturn {