1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 06:50:05 +08:00
SpaceVim/bundle/nvim-cmp/lua/cmp/utils/debug.lua
2022-01-01 22:13:13 +08:00

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