aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-12-08 11:21:42 +0100
committerGitHub <noreply@github.com>2022-12-08 11:21:42 +0100
commita27ed57ad040a7dfb67deba026df684fc375d509 (patch)
tree5293a0e734a438930e4a74b3917778e92cbd8d66 /runtime/doc/lua.txt
parent54305443b9cd5ac2c2220f12e01a653e8064c3a4 (diff)
downloadrneovim-a27ed57ad040a7dfb67deba026df684fc375d509.tar.gz
rneovim-a27ed57ad040a7dfb67deba026df684fc375d509.tar.bz2
rneovim-a27ed57ad040a7dfb67deba026df684fc375d509.zip
docs(lua): add guide to using Lua in Neovim (#21137)
Add introductory guide explaining how to use Lua in Neovim: where to put Lua files, how to set variables and options, how to create mappings, autocommands, and user commands. Adapted with kind permission from https://github.com/nanotee/nvim-lua-guide
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt9
1 files changed, 2 insertions, 7 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 27b5a39459..2682725167 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -21,12 +21,7 @@ Nvim includes a "standard library" |lua-stdlib| for Lua. It complements the
which can be used from Lua code (|lua-vimscript| |vim.api|). Together these
"namespaces" form the Nvim programming interface.
-The |:source| and |:runtime| commands can run Lua scripts. Lua modules can be
-loaded with `require('name')`, which by convention usually returns a table.
-See |lua-require| for how Nvim finds and loads Lua modules.
-
-See this page for more insight into Nvim Lua:
- https://github.com/nanotee/nvim-lua-guide
+See the |lua-guide| for an introduction to using Lua in Neovim.
*lua-compat*
Lua 5.1 is the permanent interface for Nvim Lua. Plugins need only consider
@@ -125,7 +120,7 @@ Examples using |string.match()|: >lua
For more complex matching you can use Vim regex from Lua via |vim.regex()|.
==============================================================================
-IMPORTING LUA MODULES *lua-require*
+IMPORTING LUA MODULES *require()* *lua-require*
Modules are searched for under the directories specified in 'runtimepath', in
the order they appear. Any "." in the module name is treated as a directory