From 8b7e9f71178baa863a18fb630c71effabeef710e Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 2 Oct 2022 15:24:23 -0700 Subject: [PATCH] Debugging --- plugins.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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