diff --git a/lua/zenbones/shipwright/runners/alacritty.lua b/lua/zenbones/shipwright/runners/alacritty.lua index 1a8d0ee..c8f818b 100644 --- a/lua/zenbones/shipwright/runners/alacritty.lua +++ b/lua/zenbones/shipwright/runners/alacritty.lua @@ -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) diff --git a/lua/zenbones/shipwright/runners/iterm.lua b/lua/zenbones/shipwright/runners/iterm.lua index 99bd9d8..38a3be5 100644 --- a/lua/zenbones/shipwright/runners/iterm.lua +++ b/lua/zenbones/shipwright/runners/iterm.lua @@ -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) diff --git a/lua/zenbones/shipwright/runners/kitty.lua b/lua/zenbones/shipwright/runners/kitty.lua index 25090a0..02c3baa 100644 --- a/lua/zenbones/shipwright/runners/kitty.lua +++ b/lua/zenbones/shipwright/runners/kitty.lua @@ -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) diff --git a/lua/zenbones/shipwright/runners/lightline.lua b/lua/zenbones/shipwright/runners/lightline.lua index 3cfe535..deacfc5 100644 --- a/lua/zenbones/shipwright/runners/lightline.lua +++ b/lua/zenbones/shipwright/runners/lightline.lua @@ -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) diff --git a/lua/zenbones/shipwright/runners/lualine.lua b/lua/zenbones/shipwright/runners/lualine.lua index ac31455..21419ed 100644 --- a/lua/zenbones/shipwright/runners/lualine.lua +++ b/lua/zenbones/shipwright/runners/lualine.lua @@ -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) diff --git a/lua/zenbones/shipwright/runners/tmux.lua b/lua/zenbones/shipwright/runners/tmux.lua index 82e2f1d..46f7f8b 100644 --- a/lua/zenbones/shipwright/runners/tmux.lua +++ b/lua/zenbones/shipwright/runners/tmux.lua @@ -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) diff --git a/lua/zenbones/shipwright/runners/vim.lua b/lua/zenbones/shipwright/runners/vim.lua index f2b788a..d68e514 100644 --- a/lua/zenbones/shipwright/runners/vim.lua +++ b/lua/zenbones/shipwright/runners/vim.lua @@ -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) diff --git a/lua/zenbones/shipwright/runners/wezterm.lua b/lua/zenbones/shipwright/runners/wezterm.lua index e12411c..3cde03c 100644 --- a/lua/zenbones/shipwright/runners/wezterm.lua +++ b/lua/zenbones/shipwright/runners/wezterm.lua @@ -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)