runtime(lua): Update lua ftplugin and documentation
Problem:
- The doc says the default `g:lua_subversion` is 2, but in fact it is 3
(see `runtime/syntax/lua.vim`)
- `includeexpr` doesn't work with module in `init.lua`
Solution:
- Update documentation
- Assign value to option `&include`
- Add function `LuaInclude` and assign it to `l:&includeexpr`
closes: #16655
Co-authored-by: dkearns <dougkearns@gmail.com>
Signed-off-by: brianhuster <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/syntax/lua.vim b/runtime/syntax/lua.vim
index 9c5a490..f5851d0 100644
--- a/runtime/syntax/lua.vim
+++ b/runtime/syntax/lua.vim
@@ -2,7 +2,7 @@
" Language: Lua 4.0, Lua 5.0, Lua 5.1, Lua 5.2 and Lua 5.3
" Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com>
" First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br>
-" Last Change: 2022 Sep 07
+" Last Change: 2025 Feb 25
" Options: lua_version = 4 or 5
" lua_subversion = 0 (for 4.0 or 5.0)
" or 1, 2, 3 (for 5.1, 5.2 or 5.3)
@@ -16,6 +16,7 @@
let s:cpo_save = &cpo
set cpo&vim
+" keep in sync with ftplugin/lua.vim
if !exists("lua_version")
" Default is lua 5.3
let lua_version = 5