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

@@ -1,3 +1,4 @@
-- selene: allow(undefined_variable)
run(
{ specs, p, term },
transform.colorscheme_to_term_colors,
@@ -5,3 +6,4 @@ run(
{ prepend, "# This file is auto-generated by shipwright.nvim", },
{ overwrite, string.format("extras/alacritty/%s.yml", name) }
)
-- selene: deny(undefined_variable)

View File

@@ -88,8 +88,10 @@ local function to_iterm(colorscheme)
return { template }
end
-- selene: allow(undefined_variable)
run(
{ specs, term },
to_iterm,
{ overwrite, string.format("extras/iterm/%s.itermcolors", name) }
)
-- selene: deny(undefined_variable)

View File

@@ -1,3 +1,4 @@
-- selene: allow(undefined_variable)
run(
{ specs, p, term },
transform.colorscheme_to_term_colors,
@@ -7,10 +8,10 @@ run(
author = "Michael Chris Lopez",
license = "MIT",
upstream = string.format("https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/%s.conf", name),
url_color = term[13].hex,
tab_active_bg = specs.Search.bg.hex,
url_color = term[13],
tab_active_bg = specs.Search.bg,
tab_active_fg = colors.fg,
tab_inactive_bg = specs.StatusLine.bg.hex,
tab_inactive_bg = specs.StatusLine.bg,
tab_inactive_fg = colors.fg,
})
end,
@@ -18,3 +19,4 @@ run(
{ prepend, "# This file is auto-generated by shipwright.nvim" },
{ overwrite, string.format("extras/kitty/%s.conf", name) }
)
-- selene: deny(undefined_variable)

View File

@@ -57,7 +57,8 @@ local function transform(colors)
return { text }
end
local function specs_to_colors(specs)
local function specs_to_colors(colorscheme)
local specs, name = unpack(colorscheme)
return {
name = name,
common_fg = specs.Folded.fg,
@@ -83,10 +84,12 @@ local function specs_to_colors(specs)
}
end
-- selene: allow(undefined_variable)
run(
specs,
{ specs, name },
specs_to_colors,
transform,
{ prepend, [[" This file is auto-generated by shipwright.nvim]] },
{ overwrite, string.format("autoload/lightline/colorscheme/%s.vim", name) }
)
-- selene: deny(undefined_variable)

View File

@@ -74,6 +74,7 @@ local function specs_to_colors(specs)
}
end
-- selene: allow(undefined_variable)
run(
specs,
specs_to_colors,
@@ -81,3 +82,4 @@ run(
{ prepend, "-- This file is auto-generated by shipwright.nvim" },
{ overwrite, string.format("lua/lualine/themes/%s.lua", name) }
)
-- selene: deny(undefined_variable)

View File

@@ -19,6 +19,7 @@ set -g mode-style fg='$black',bg='$selection_bg'
local helpers = require "shipwright.transform.helpers"
-- selene: allow(undefined_variable)
run(
{ specs, p, term },
transform.colorscheme_to_term_colors,
@@ -29,3 +30,4 @@ run(
{ prepend, "# This file is auto-generated by shipwright.nvim" },
{ overwrite, string.format("extras/tmux/%s.tmux", name) }
)
-- selene: deny(undefined_variable)

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)

View File

@@ -1,12 +1,14 @@
-- selene: allow(undefined_variable)
run(
{ specs, p, term },
transform.colorscheme_to_term_colors,
function(colors)
return vim.tbl_extend("keep", colors, {
cursor_border = specs.Cursor.fg.hex,
cursor_border = specs.Cursor.fg,
})
end,
contrib.wezterm,
{ prepend, "# This file is auto-generated by shipwright.nvim" },
{ overwrite, string.format("extras/wezterm/%s.toml", name:sub(1, 1):upper() .. name:sub(2)) }
)
-- selene: deny(undefined_variable)