diff --git a/plugins.vim b/plugins.vim index 30bacd6..503fdef 100644 --- a/plugins.vim +++ b/plugins.vim @@ -100,6 +100,18 @@ lua << EOF -- Set completeopt to have a better completion experience vim.o.completeopt = 'menuone,noselect' + + -- Helper for dumping Lua tables + function _G.put(...) + local objects = {} + for i = 1, select('#', ...) do + local v = select(i, ...) + table.insert(objects, vim.inspect(v)) + end + + print(table.concat(objects, '\n')) + return ... + end EOF endif