aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorshadmansaleh <13149513+shadmansaleh@users.noreply.github.com>2022-01-04 11:05:15 +0600
committershadmansaleh <13149513+shadmansaleh@users.noreply.github.com>2022-01-04 16:08:07 +0600
commitd44254641ffb5c9f185db4082d2bf1f04bf1117e (patch)
treea48ea400721dcf3d9a61ef73850472a8dfe13aa6 /runtime
parent207307d0faf9b821cfd3cfeae4d027ab9ee5dbdb (diff)
downloadrneovim-d44254641ffb5c9f185db4082d2bf1f04bf1117e.tar.gz
rneovim-d44254641ffb5c9f185db4082d2bf1f04bf1117e.tar.bz2
rneovim-d44254641ffb5c9f185db4082d2bf1f04bf1117e.zip
feat(lua): make =expr print result of expr
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/lua.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index eaa25f0961..63f142b789 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -249,13 +249,15 @@ arguments separated by " " (space) instead of "\t" (tab).
*:lua*
:[range]lua {chunk}
Executes Lua chunk {chunk}.
-
+ if {chunk} starts with "=" the rest of the chunk is
+ evaluated as an expression and printed. `:lua =expr`
+ is equivalent to `:lua print(vim.inspect(expr))`
Examples: >
:lua vim.api.nvim_command('echo "Hello, Nvim!"')
< To see the Lua version: >
:lua print(_VERSION)
< To see the LuaJIT version: >
- :lua print(jit.version)
+ :lua =jit.version
<
*:lua-heredoc*
:[range]lua << [endmarker]