fix lint errors

This commit is contained in:
Michael Chris Lopez
2021-11-06 12:04:23 +08:00
parent 8185f46dcd
commit 0473b25a05
8 changed files with 28 additions and 7 deletions

View File

@@ -31,7 +31,8 @@ endfunction
local helpers = require "shipwright.transform.helpers"
local function to_vim_autoload(vimcolors)
local function to_vim_autoload(colorscheme)
local vimcolors, term, name = unpack(colorscheme)
local termcolors = ""
for i, v in ipairs(term) do
termcolors = termcolors .. string.format("let g:terminal_color_%s = '%s'\n", (i - 1), v.hex)
@@ -47,11 +48,16 @@ end
local lushwright = require "shipwright.transform.lush"
-- selene: allow(undefined_variable)
run(
specs,
lushwright.to_vimscript,
lushwright.vim_compatible_vimscript,
function(vimcolors)
return { vimcolors, term, name }
end,
to_vim_autoload,
{ prepend, [[" This file is auto-generated by shipwright.nvim]] },
{ overwrite, string.format("autoload/%s.vim", name) }
)
-- selene: deny(undefined_variable)