diff --git a/README.md b/README.md index f2d30ae..414d54f 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,33 @@ Based on wombat256mod and the iTerm 2 Wombat colors. Created with [Lush](http://git.io/lush.nvim) ![Screenshot](https://user-images.githubusercontent.com/137025/138964572-88d52e78-c971-4e69-8d4f-65b5fa245e51.png) +## Included colorschemes -## Installation with Packer +### wombat + +A colorscheme based on the iTerm2 Wombat colorscheme with support for newer Neovim highlights. + +### wombat_classic + +A colorscheme based on the original wombat256mod colorscheme. This does not have highlights for newer Neovim features. + +### wombat_lush + +A colorscheme based on the original wombat256mod colorscheme, but with extended support for newer Neovim features. + +## Installation + +### With Packer use { "ViViDboarder/wombat.nvim", requires = "rktjmp/lush.nvim", } + +## Extending + +If you are using a terminal colorsceme based on Wombat and would like your colors to match more percisely, you can define a new set of ansi colors in a lua file similar to the one shown in `lua/wombat/ansi_iterm.lua'. It should be in a path `lua/wombat/ansi_new_theme.lua`. + +Then you can create a new colorscheme file similar to `colors/wombat.vim`, but reference the new file name instead of `ansi_iterm`. + +This will define a new colorscheme using the same mappings as defined in wombat.nvim, but with your new ansi colors. diff --git a/colors/wombat_classic.vim b/colors/wombat_classic.vim index 67c16a8..699dd91 100644 --- a/colors/wombat_classic.vim +++ b/colors/wombat_classic.vim @@ -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').with_ansi("ansi_lush")) +lua require('lush')(require('lush_theme.wombat_classic').with_ansi("ansi_256mod")) diff --git a/colors/wombat_classic_256mod.vim b/colors/wombat_classic_256mod.vim deleted file mode 100644 index c7f8a11..0000000 --- a/colors/wombat_classic_256mod.vim +++ /dev/null @@ -1,19 +0,0 @@ -" 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")) diff --git a/colors/wombat_lush.vim b/colors/wombat_lush.vim index 64ca296..b2d0bc1 100644 --- a/colors/wombat_lush.vim +++ b/colors/wombat_lush.vim @@ -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').with_ansi("ansi_lush")) +lua require('lush')(require('lush_theme.wombat_lush').with_ansi("ansi_256mod")) diff --git a/lua/lush_theme/wombat_classic.lua b/lua/lush_theme/wombat_classic.lua index 63e5a7d..642edf7 100644 --- a/lua/lush_theme/wombat_classic.lua +++ b/lua/lush_theme/wombat_classic.lua @@ -49,6 +49,8 @@ function M.with_ansi(ansi_colors_name) local hsl = lush.hsl local c = require("wombat.colors").from_ansi(ansi_colors_name) + -- Import 256mod colors because we always use that background in classic + local c256mod = require("wombat.colors").from_ansi("ansi_256mod") local italic = "italic" -- LSP/Linters mistakenly show `undefined global` errors in the spec, they may @@ -99,7 +101,7 @@ function M.with_ansi(ansi_colors_name) -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display' -- MoreMsg { }, -- |more-prompt| NonText({ LineNr }), -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. - Normal({ bg = c.dark_bg_256mod, fg = c.dark_fg_256mod }), -- normal text + Normal({ bg = c256mod.background, fg = c256mod.foreground }), -- normal text -- NormalFloat { }, -- Normal text in floating windows. -- NormalNC { }, -- normal text in non-current windows Pmenu({ fg = c.bright_yellow, bg = c.grey_5 }), -- Popup menu: normal item. diff --git a/lua/lush_theme/wombat_lush.lua b/lua/lush_theme/wombat_lush.lua index 7677f22..42ac213 100644 --- a/lua/lush_theme/wombat_lush.lua +++ b/lua/lush_theme/wombat_lush.lua @@ -48,7 +48,7 @@ function M.with_ansi(ansi_colors_name) local lush = require("lush") local c = require("wombat.colors").from_ansi(ansi_colors_name) - local classic = require("lush_theme.wombat_classic") + local classic = require("lush_theme.wombat_classic").with_ansi(ansi_colors_name) -- LSP/Linters mistakenly show `undefined global` errors in the spec, they may -- support an annotation li @@ -100,7 +100,7 @@ function M.with_ansi(ansi_colors_name) -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display' -- MoreMsg { }, -- |more-prompt| -- NonText { LineNr }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. - Normal({ bg = c.dark_bg, fg = c.dark_fg }), -- normal text + Normal({ bg = c.background, fg = c.foreground }), -- normal text NormalFloat({ bg = Normal.bg.lighten(10), fg = classic.Special.fg }), -- Normal text in floating windows. FloatBorder({ bg = NormalFloat.bg, fg = classic.Pmenu.fg }), -- float border -- NormalNC { }, -- normal text in non-current windows