This commit is contained in:
Christian Nieves
2022-11-14 18:24:34 +00:00
parent b4e5d6a60a
commit 9028ccc503
18 changed files with 152 additions and 237 deletions

View File

@ -8,4 +8,22 @@ function M.map(mode, lhs, rhs, opts)
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
function M.file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
function M.dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
return M