From 04761da6647f61fd9bcd14c21f6396449a15f256 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 4 Mar 2022 15:05:34 +0100 Subject: [PATCH] home: vim: add 'dump' utility function --- home/vim/lua/ambroisie/utils.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/vim/lua/ambroisie/utils.lua b/home/vim/lua/ambroisie/utils.lua index 559911c..dc66a4f 100644 --- a/home/vim/lua/ambroisie/utils.lua +++ b/home/vim/lua/ambroisie/utils.lua @@ -1,5 +1,11 @@ local M = {} +-- pretty print lua object +-- @param obj any object to pretty print +M.dump = function(obj) + print(vim.inspect(obj)) +end + --- checks if a given command is executable ---@param cmd string? command to check ---@return boolean executable