From fd89f0cd3a3672547117089888dcf5a67f4c1943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Sterle?= Date: Fri, 4 Feb 2022 23:47:57 +0100 Subject: [PATCH] mention vim.pretty_print() --- README.md | 2 +- doc/nvim-lua-guide.txt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c18e00f..18fcbb4 100644 --- a/README.md +++ b/README.md @@ -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(...) diff --git a/doc/nvim-lua-guide.txt b/doc/nvim-lua-guide.txt index ade68ed..71d78ee 100644 --- a/doc/nvim-lua-guide.txt +++ b/doc/nvim-lua-guide.txt @@ -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(...)