aboutsummaryrefslogtreecommitdiff
path: root/scripts/genvimvim.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-09-19 16:56:57 -0700
committerGitHub <noreply@github.com>2021-09-19 16:56:57 -0700
commit490e09c6d81b9bf52eac7aa146e62b3da2d86579 (patch)
tree0366992caba56591c6e775d48a040e4939f65951 /scripts/genvimvim.lua
parent39c886551bf8323b63938f5dee5beb650c61f02b (diff)
parent41da72ffb652d7b6e391783fb9bc8777028bdb36 (diff)
downloadrneovim-490e09c6d81b9bf52eac7aa146e62b3da2d86579.tar.gz
rneovim-490e09c6d81b9bf52eac7aa146e62b3da2d86579.tar.bz2
rneovim-490e09c6d81b9bf52eac7aa146e62b3da2d86579.zip
Merge #15727 build(lint): check scripts/*.lua
Diffstat (limited to 'scripts/genvimvim.lua')
-rw-r--r--scripts/genvimvim.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/genvimvim.lua b/scripts/genvimvim.lua
index 2c3701bf0c..ff60b6cce7 100644
--- a/scripts/genvimvim.lua
+++ b/scripts/genvimvim.lua
@@ -1,4 +1,4 @@
-mpack = require('mpack')
+local mpack = require('mpack')
if arg[1] == '--help' then
print('Usage: lua genvimvim.lua src/nvim runtime/syntax/vim/generated.vim')
@@ -52,7 +52,7 @@ local function is_autocmd_cmd(cmd)
or cmd == 'doautoall')
end
-vimcmd_start = 'syn keyword vimCommand contained '
+local vimcmd_start = 'syn keyword vimCommand contained '
w(vimcmd_start)
local prev_cmd = nil
for _, cmd_desc in ipairs(ex_cmds.cmds) do
@@ -123,9 +123,8 @@ end
w('\n\nsyn case match')
local vimfun_start = 'syn keyword vimFuncName contained '
w('\n\n' .. vimfun_start)
-funcs = mpack.unpack(io.open(funcs_file, 'rb'):read("*all"))
-local started = 0
-for name, def in pairs(funcs) do
+local funcs = mpack.unpack(io.open(funcs_file, 'rb'):read("*all"))
+for name, _ in pairs(funcs) do
if name then
if lld.line_length > 850 then
w('\n' .. vimfun_start)