New variants based off different ansi colors

This commit is contained in:
ViViDboarder 2025-01-08 13:59:38 -08:00
parent e4ce2b61a3
commit 4fd550de43
8 changed files with 533 additions and 434 deletions

19
colors/wombat.vim Normal file
View File

@ -0,0 +1,19 @@
" You probably always want to set this in your vim file
let g:colors_name='wombat'
" By setting our module to nil, we clear lua's cache,
" which means the require ahead will *always* occur.
"
" This isn't strictly required but it can be a useful trick if you are
" incrementally editing your config a lot and want to be sure your themes
" changes are being picked up without restarting neovim.
"
" Note if you're working in on your theme and have :Lushify'd the buffer,
" your changes will be applied with our without the following line.
"
" The performance impact of this call can be measured in the hundreds of
" *nanoseconds* and such could be considered 'production safe'.
lua package.loaded['lush_theme.lush_template'] = nil
" include our theme file and pass it to lush to apply
lua require('lush')(require('lush_theme.wombat_lush').with_ansi("ansi_iterm"))

View File

@ -16,4 +16,4 @@ let g:colors_name='wombat_classic'
lua package.loaded['lush_theme.lush_template'] = nil
" include our theme file and pass it to lush to apply
lua require('lush')(require('lush_theme.wombat_classic'))
lua require('lush')(require('lush_theme.wombat_classic').with_ansi("ansi_lush"))

View File

@ -0,0 +1,19 @@
" You probably always want to set this in your vim file
let g:colors_name='wombat_classic_256mod'
" By setting our module to nil, we clear lua's cache,
" which means the require ahead will *always* occur.
"
" This isn't strictly required but it can be a useful trick if you are
" incrementally editing your config a lot and want to be sure your themes
" changes are being picked up without restarting neovim.
"
" Note if you're working in on your theme and have :Lushify'd the buffer,
" your changes will be applied with our without the following line.
"
" The performance impact of this call can be measured in the hundreds of
" *nanoseconds* and such could be considered 'production safe'.
lua package.loaded['lush_theme.lush_template'] = nil
" include our theme file and pass it to lush to apply
lua require('lush')(require('lush_theme.wombat_classic').with_ansi("ansi_256mod"))

View File

@ -16,4 +16,4 @@ let g:colors_name='wombat_lush'
lua package.loaded['lush_theme.lush_template'] = nil
" include our theme file and pass it to lush to apply
lua require('lush')(require('lush_theme.wombat_lush'))
lua require('lush')(require('lush_theme.wombat_lush').with_ansi("ansi_lush"))

View File

@ -42,16 +42,19 @@
--
-- `:lua require('lush').ify()`
local lush = require("lush")
local hsl = lush.hsl
local M = {}
local c = require("wombat.colors").from_ansi("ansi_lush")
local italic = "italic"
function M.with_ansi(ansi_colors_name)
local lush = require("lush")
local hsl = lush.hsl
-- LSP/Linters mistakenly show `undefined global` errors in the spec, they may
-- support an annotation like the following. Consult your server documentation.
-- -@diagnostic disable: undefined-global
local theme = lush(function()
local c = require("wombat.colors").from_ansi(ansi_colors_name)
local italic = "italic"
-- LSP/Linters mistakenly show `undefined global` errors in the spec, they may
-- support an annotation like the following. Consult your server documentation.
-- -@diagnostic disable: undefined-global
local theme = lush(function()
return {
-- The following are all the Neovim default highlight groups from the docs
-- as of 0.5.0-nightly-446, to aid your theme creation. Your themes should
@ -269,9 +272,11 @@ local theme = lush(function()
-- TSLiteral { }; -- Literal text.
-- TSURI { }; -- Any URI like a link or email.
}
end)
end)
-- return our parsed theme for extension or use else where.
return theme
-- return our parsed theme for extension or use else where.
return theme
end
return M
-- vi:nowrap

View File

@ -42,16 +42,19 @@
--
-- `:lua require('lush').ify()`
local lush = require("lush")
local M = {}
local c = require("wombat.colors").from_ansi("ansi_lush")
local classic = require("lush_theme.wombat_classic")
function M.with_ansi(ansi_colors_name)
local lush = require("lush")
-- LSP/Linters mistakenly show `undefined global` errors in the spec, they may
-- support an annotation li
-- luacheck: ignore
-- @diagnostic disable: undefined-global
local theme = lush.extends({ classic }).with(function(injected_functions)
local c = require("wombat.colors").from_ansi(ansi_colors_name)
local classic = require("lush_theme.wombat_classic")
-- LSP/Linters mistakenly show `undefined global` errors in the spec, they may
-- support an annotation li
-- luacheck: ignore
-- @diagnostic disable: undefined-global
local theme = lush.extends({ classic }).with(function(injected_functions)
local sym = injected_functions.sym
return {
-- The following are all the Neovim default highlight groups from the docs
@ -293,9 +296,12 @@ local theme = lush.extends({ classic }).with(function(injected_functions)
CmpItemKindProperty({ TSProperty }),
-- CmpItemKindUnit { Normal },
}
end)
end)
-- return our parsed theme for extension or use else where.
return theme
-- return our parsed theme for extension or use else where.
return theme
end
return M
-- vi:nowrap

View File

@ -0,0 +1,15 @@
-- Define the base color palet for wombat
local lush = require("lush")
local hsl = lush.hsl
-- Modify my lush colors with a few tweaks to match the old 256mod colors
local M = require("wombat.ansi_lush")
M.blue = hsl("#88b8f6")
M.bright_green = hsl("#cae982")
M.foreground = hsl("#e3e0d7")
M.background = hsl("#242424")
return M

35
lua/wombat/ansi_iterm.lua Normal file
View File

@ -0,0 +1,35 @@
-- Define the base color palet for wombat
local lush = require("lush")
local hsl = lush.hsl
local M = {}
-- ANSI terminal colors
M.black = hsl("#000000")
M.red = hsl("#ff615a")
M.green = hsl("#b1e969")
M.yellow = hsl("#ebd99c")
M.blue = hsl("#5da9f6")
M.magenta = hsl("#e86aff")
M.cyan = hsl("#82fff7")
M.white = hsl("#dedacf")
M.bright_black = hsl("#313131")
M.bright_red = hsl("#f58c80")
M.bright_green = hsl("#ddf88f")
M.bright_yellow = hsl("#eee5b2")
M.bright_blue = hsl("#a5c7ff")
M.bright_magenta = hsl("#ddaaff")
M.bright_cyan = hsl("#b7fff9")
M.bright_white = hsl("#ffffff")
M.foreground = hsl("#dedacf")
M.background = hsl("#171717")
M.cursor = hsl("#bbbbbb")
M.cursor_text = hsl("#ffffff")
M.selection_background = hsl("#453b39")
M.selection_foreground = hsl("#b6bbc0")
return M