parent
64a3b6c74a
commit
c5dc5dd1e9
|
@ -16,7 +16,7 @@ pub fn logFn(
|
|||
null;
|
||||
|
||||
const color = log_file == null and stderr_isatty orelse blk: {
|
||||
const isatty = std.os.isatty(std.os.STDERR_FILENO);
|
||||
const isatty = std.posix.isatty(std.posix.STDERR_FILENO);
|
||||
stderr_isatty = isatty;
|
||||
break :blk isatty;
|
||||
};
|
||||
|
|
|
@ -48,6 +48,8 @@ pub fn build(b: *std.Build) !void {
|
|||
compiler.linkLibC();
|
||||
compiler.linkSystemLibrary("luajit");
|
||||
|
||||
compiler.root_module.addImport("common", b.dependency("common", .{}).module("common"));
|
||||
|
||||
compiler.root_module.unwind_tables = true;
|
||||
|
||||
b.installArtifact(compiler);
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
(use/mztegit :promise-async)
|
||||
(use/pconf :nvim-ufo :ufo {:after :nvim-lspconfig})
|
||||
(use/pconf :aerial.nvim :aerial)
|
||||
(use/mztegit :nvim-nio) ;; dep of dap-ui
|
||||
(use/mztegit :nvim-dap-ui)
|
||||
(use/pconf :nvim-dap :dap)
|
||||
(use/pconf :harpoon :harpoon)
|
||||
|
|
|
@ -7,6 +7,7 @@ const log = std.log.scoped(.compiler);
|
|||
|
||||
pub const std_options = std.Options{
|
||||
.log_level = .debug,
|
||||
.logFn = @import("common").logFn,
|
||||
};
|
||||
|
||||
pub fn main() !void {
|
||||
|
|
|
@ -74,7 +74,7 @@ fn lFindRuntimes(l: *c.lua_State) !c_int {
|
|||
/// https://github.com/dgileadi/vscode-java-decompiler/tree/master/server
|
||||
// TODO: add command to download these maybe?
|
||||
fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
||||
const home = std.os.getenv("HOME") orelse return error.HomeNotSet;
|
||||
const home = std.posix.getenv("HOME") orelse return error.HomeNotSet;
|
||||
|
||||
const bundle_path = try std.fs.path.join(
|
||||
std.heap.c_allocator,
|
||||
|
@ -137,10 +137,10 @@ fn lGetBundleInfo(l: *c.lua_State) !c_int {
|
|||
}
|
||||
|
||||
fn lGetDirs(l: *c.lua_State) !c_int {
|
||||
const home = std.os.getenv("HOME") orelse return error.HomeNotSet;
|
||||
const home = std.posix.getenv("HOME") orelse return error.HomeNotSet;
|
||||
|
||||
var cwd_buf: [256]u8 = undefined;
|
||||
const cwd_basename = std.fs.path.basename(try std.os.getcwd(&cwd_buf));
|
||||
const cwd_basename = std.fs.path.basename(try std.posix.getcwd(&cwd_buf));
|
||||
|
||||
const config_path = try std.fs.path.joinZ(
|
||||
std.heap.c_allocator,
|
||||
|
|
|
@ -14,7 +14,7 @@ pub fn luaPush(l: *c.lua_State) void {
|
|||
/// This is basically a reimplementation of `which`.
|
||||
fn lFindInPath(l: *c.lua_State) !c_int {
|
||||
const bin = ffi.luaCheckstring(l, 1);
|
||||
const path = std.os.getenv("PATH") orelse return error.PathNotSet;
|
||||
const path = std.posix.getenv("PATH") orelse return error.PathNotSet;
|
||||
|
||||
var splits = std.mem.split(u8, path, ":");
|
||||
while (splits.next()) |p| {
|
||||
|
|
Loading…
Reference in New Issue