mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 06:50:05 +08:00
21 lines
380 B
Lua
Vendored
21 lines
380 B
Lua
Vendored
local debug = {}
|
|
|
|
debug.flag = false
|
|
|
|
---Print log
|
|
---@vararg any
|
|
debug.log = function(...)
|
|
if debug.flag then
|
|
local data = {}
|
|
for _, v in ipairs({ ... }) do
|
|
if not vim.tbl_contains({ 'string', 'number', 'boolean' }, type(v)) then
|
|
v = vim.inspect(v)
|
|
end
|
|
table.insert(data, v)
|
|
end
|
|
print(table.concat(data, '\t'))
|
|
end
|
|
end
|
|
|
|
return debug
|