vim-patch:00a00f5: 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: vim/vim#16655

00a00f5d3f

Co-authored-by: brianhuster <phambinhanctb2004@gmail.com>
Co-authored-by: dkearns <dougkearns@gmail.com>
This commit is contained in:
brianhuster
2025-03-01 01:27:40 +07:00
committed by zeertzjq
parent ea4a7cc616
commit 2b0f967b77
4 changed files with 50 additions and 15 deletions

View File

@@ -695,7 +695,18 @@ To enable the recognition of Markdown comments each time after removing
re-source "javaformat.vim" for Vim versions greater than `8.2.1397`: >
runtime autoload/javaformat.vim
<
LUA *ft-lua-plugin*
*g:lua_version* *g:lua_subversion*
Lua filetype's 'includeexpr' and |ft-lua-syntax| highlighting use the global
variables "g:lua_version" and "g:lua_subversion" to determine the version of
Lua to use (5.3 is the default)
For example, to use Lua 5.1, set the variables like this: >
let g:lua_version = 5
let g:lua_subversion = 1
<
MAIL *ft-mail-plugin*
Options:

View File

@@ -1870,13 +1870,9 @@ instead, and the name of your source file should be `*.pike`
LUA *lua.vim* *ft-lua-syntax*
The Lua syntax file can be used for versions 4.0, 5.0, 5.1 and 5.2 (5.2 is
the default). You can select one of these versions using the global variables
lua_version and lua_subversion. For example, to activate Lua
5.1 syntax highlighting, set the variables like this: >
:let lua_version = 5
:let lua_subversion = 1
The Lua syntax file can be used for versions 4.0, 5.0+. You can select one of
these versions using the global variables |g:lua_version| and
|g:lua_subversion|.
MAIL *mail.vim* *ft-mail.vim*