mention vim.pretty_print()

pull/97/merge
Timothée Sterle 2 years ago
parent f0be3f8c3b
commit fd89f0cd3a
No known key found for this signature in database
GPG Key ID: 136D558122196ED5

@ -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…
Cancel
Save