mirror of
https://github.com/gosticks/bookmarks.nvim.git
synced 2025-10-16 11:55:38 +00:00
refactor: remove dump util function
use `vim.pretty_print` instead of dump
This commit is contained in:
parent
e502d33bf8
commit
5985bf4949
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user