From a27ed57ad040a7dfb67deba026df684fc375d509 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 8 Dec 2022 11:21:42 +0100 Subject: 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 --- runtime/doc/lua.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'runtime/doc/lua.txt') 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 -- cgit