update: updates

This commit is contained in:
wyj
2025-02-25 20:55:43 -05:00
parent 450d64d713
commit 7a1fe84744
162 changed files with 11338 additions and 115 deletions
+32
View File
@@ -0,0 +1,32 @@
local M = {}
function M.input_args()
local argument_string = vim.fn.input("Program arg(s) (enter nothing to leave it null): ")
return vim.fn.split(argument_string, " ", true)
end
function M.input_exec_path()
return vim.fn.input('Path to executable (default to "a.out"): ', vim.fn.expand("%:p:h") .. "/a.out", "file")
end
function M.input_file_path()
return vim.fn.input("Path to debuggee (default to the current file): ", vim.fn.expand("%:p"), "file")
end
function M.get_env()
local variables = {}
for k, v in pairs(vim.fn.environ()) do
table.insert(variables, string.format("%s=%s", k, v))
end
return variables
end
return setmetatable({}, {
__index = function(_, key)
return function()
return function()
return M[key]()
end
end
end,
})