refactor: remove dump util function

use `vim.pretty_print` instead of dump
This commit is contained in:
tomasky 2022-08-01 15:07:00 +08:00
parent e502d33bf8
commit 5985bf4949

View File

@ -118,21 +118,6 @@ M.read_file = function(path, callback)
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 .. "] = " .. M.dump(v) .. ","
end
return s .. "} "
else
return tostring(o)
end
end
function M.warn(...)
vim.notify(string.format(...), vim.log.levels.WARN)
end