aboutsummaryrefslogtreecommitdiff
path: root/scripts/genvimvim.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-09-19 16:35:38 -0700
committerJustin M. Keyes <justinkz@gmail.com>2021-09-19 16:36:08 -0700
commit736299bf22c47f120d0790f2390511f3302f74a3 (patch)
treec02a7daf7c816ba8ad3a698dac078f617853703a /scripts/genvimvim.lua
parent39c886551bf8323b63938f5dee5beb650c61f02b (diff)
downloadrneovim-736299bf22c47f120d0790f2390511f3302f74a3.tar.gz
rneovim-736299bf22c47f120d0790f2390511f3302f74a3.tar.bz2
rneovim-736299bf22c47f120d0790f2390511f3302f74a3.zip
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)