update dump() snippet

This commit is contained in:
Timothée Sterle 2021-07-06 23:27:25 +02:00
parent ef370d6b73
commit bcbc72d9c0
No known key found for this signature in database
GPG Key ID: 136D558122196ED5
2 changed files with 2 additions and 0 deletions

View File

@ -394,6 +394,7 @@ Writing `print(vim.inspect(x))` every time you want to inspect the contents of a
function _G.dump(...)
local objects = vim.tbl_map(vim.inspect, {...})
print(unpack(objects))
return ...
end
```

View File

@ -488,6 +488,7 @@ have a global wrapper function somewhere in your configuration:
function _G.dump(...)
local objects = vim.tbl_map(vim.inspect, {...})
print(unpack(objects))
return ...
end
<