mention vim.pretty_print()

This commit is contained in:
Timothée Sterle 2022-02-04 23:47:57 +01:00
parent f0be3f8c3b
commit fd89f0cd3a
No known key found for this signature in database
GPG Key ID: 136D558122196ED5
2 changed files with 4 additions and 3 deletions

View File

@ -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(...)

View File

@ -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(...)