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>
This commit is contained in:
committed by
Christian Brabandt
parent
12b1eb58ab
commit
00a00f5d3f
@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 9.1. Last change: 2025 Feb 20
|
||||
*filetype.txt* For Vim version 9.1. Last change: 2025 Feb 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -744,12 +744,21 @@ Add following lines to $HOME/.vim/ftplugin/json.vim: >
|
||||
import autoload 'dist/json.vim'
|
||||
setl formatexpr=json.FormatExpr()
|
||||
|
||||
LUA *ft-lua-plugin*
|
||||
LUA *ft-lua-plugin* *g:lua_folding*
|
||||
|
||||
You can enable folding of Lua functions using |fold-expr| by: >
|
||||
|
||||
let g:lua_folding = 1
|
||||
< *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:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Feb 23
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Feb 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2343,13 +2343,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*
|
||||
|
||||
@ -7625,6 +7625,9 @@ g:html_use_input_for_pc syntax.txt /*g:html_use_input_for_pc*
|
||||
g:html_use_xhtml syntax.txt /*g:html_use_xhtml*
|
||||
g:html_whole_filler syntax.txt /*g:html_whole_filler*
|
||||
g:lf_shell_syntax syntax.txt /*g:lf_shell_syntax*
|
||||
g:lua_folding filetype.txt /*g:lua_folding*
|
||||
g:lua_subversion filetype.txt /*g:lua_subversion*
|
||||
g:lua_version filetype.txt /*g:lua_version*
|
||||
g:markdown_fenced_languages syntax.txt /*g:markdown_fenced_languages*
|
||||
g:markdown_minlines syntax.txt /*g:markdown_minlines*
|
||||
g:markdown_syntax_conceal syntax.txt /*g:markdown_syntax_conceal*
|
||||
|
||||
Reference in New Issue
Block a user