mirror of
https://github.com/nanotee/nvim-lua-guide
synced 2024-11-05 06:00:39 +00:00
update dump()
snippet
This commit is contained in:
parent
ef370d6b73
commit
bcbc72d9c0
@ -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
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
<
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user