mirror of
https://github.com/nanotee/nvim-lua-guide
synced 2024-11-15 06:13:00 +00:00
mention vim.pretty_print()
This commit is contained in:
parent
f0be3f8c3b
commit
fd89f0cd3a
@ -407,7 +407,7 @@ This list is by no means comprehensive. If you wish to know more about what's ma
|
||||
|
||||
#### Tips
|
||||
|
||||
Writing `print(vim.inspect(x))` every time you want to inspect the contents of an object can get pretty tedious. It might be worthwhile to have a global wrapper function somewhere in your configuration:
|
||||
Writing `print(vim.inspect(x))` every time you want to inspect the contents of an object can get pretty tedious. It might be worthwhile to have a global wrapper function somewhere in your configuration (in Neovim 0.7.0+, this function is built-in, see [`:help vim.pretty_print()`](https://neovim.io/doc/user/lua.html#vim.pretty_print())):
|
||||
|
||||
```lua
|
||||
function _G.put(...)
|
||||
|
@ -501,8 +501,9 @@ of every module. API functions are documented under |api-global|.
|
||||
Tips~
|
||||
|
||||
Writing `print(vim.inspect(x))` every time you want to inspect the
|
||||
contents of an object can get pretty tedious. It might be worthwhile to
|
||||
have a global wrapper function somewhere in your configuration:
|
||||
contents of an object can get pretty tedious. It might be worthwhile
|
||||
to have a global wrapper function somewhere in your configuration (in
|
||||
Neovim 0.7.0+, this function is built-in, see |vim.pretty_print()|):
|
||||
|
||||
>
|
||||
function _G.put(...)
|
||||
|
Loading…
Reference in New Issue
Block a user