mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-14 16:33:40 +01:00
upadte mzte-nv
This commit is contained in:
parent
a17571af2b
commit
4c4139709a
3 changed files with 9 additions and 7 deletions
|
@ -3,6 +3,11 @@ local map = vim.api.nvim_set_keymap
|
||||||
require("nvim-tree").setup {
|
require("nvim-tree").setup {
|
||||||
open_on_setup = not vim.g.started_by_vinput,
|
open_on_setup = not vim.g.started_by_vinput,
|
||||||
open_on_setup_file = false,
|
open_on_setup_file = false,
|
||||||
|
actions = {
|
||||||
|
change_dir = {
|
||||||
|
global = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
view = {
|
view = {
|
||||||
adaptive_size = true,
|
adaptive_size = true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,15 +20,12 @@ pub fn main() !void {
|
||||||
|
|
||||||
const input_arg = std.mem.span(std.os.argv[1]);
|
const input_arg = std.mem.span(std.os.argv[1]);
|
||||||
|
|
||||||
try doCompile(input_arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn doCompile(path: []const u8) !void {
|
|
||||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
defer _ = gpa.deinit();
|
defer _ = gpa.deinit();
|
||||||
|
try doCompile(input_arg, gpa.allocator());
|
||||||
|
}
|
||||||
|
|
||||||
const alloc = gpa.allocator();
|
pub fn doCompile(path: []const u8, alloc: std.mem.Allocator) !void {
|
||||||
|
|
||||||
var dir = try std.fs.cwd().openIterableDir(path, .{});
|
var dir = try std.fs.cwd().openIterableDir(path, .{});
|
||||||
defer dir.close();
|
defer dir.close();
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,6 @@ pub fn luaPush(l: *c.lua_State) void {
|
||||||
|
|
||||||
fn lCompilePath(l: *c.lua_State) !c_int {
|
fn lCompilePath(l: *c.lua_State) !c_int {
|
||||||
const path = c.luaL_checklstring(l, 1, null);
|
const path = c.luaL_checklstring(l, 1, null);
|
||||||
try compiler.doCompile(std.mem.span(path));
|
try compiler.doCompile(std.mem.span(path), std.heap.c_allocator);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue