A semantic coloring code colorscheme for NeoVim ported from Eva-Theme
Supports both Dark and Light modes, with four styles available for each mode: Normal, Bold, Italic, and Italic Bold.
| dark | light | semantic |
|---|---|---|
| type names, arithmetic operators | ||
| string context | ||
| parameter name and typeparameter | ||
| numbers, constants | ||
| object members/properties, namespaces/modules | ||
builtin variables like self, super, this, base
|
||
| flow control keywords, boolean literal, null literal,keyword operators | ||
| declaration keywords | ||
| function-like names | ||
| variable | ||
| comment | ||
| primitive/builtin type names |
{
'sharpchen/Eva-Theme.nvim',
lazy = false,
priority = 1000,
}colo Eva-Dark " or any other variant
" colo Eva-Light
" colo Eva-Dark-Bold
" colo Eva-Light-Bold
" colo Eva-Dark-Italic
" colo Eva-Light-Italic
" colo Eva-Dark-Italic-Bold
" colo Eva-Light-Italic-Boldvim.cmd.colo 'Eva-Dark' -- or any variantSpecify colors for dark and light variants, specified values will be taken while the rest remains default.
Tip
For palette structure, see: palette.lua Or use lazydev.nvim to get completions from type annotations.
require('Eva-Theme').setup({
override_palette = {
---@type Eva-Theme.Palette
dark = {
typeparam = '#RRGGBB'
},
light = function(palette)
---@type Eva-Theme.Palette
return {
typeparam = palette.light_base.primitive,
}
end,
}
})Config.override_highlight is a callback to generate a hash table of highlights.
It has two parameters, one is the variant name such as dark_bold, light_italic_bold, another is a wrapper of all available palettes on the context.
require('Eva-Theme').setup({
override_highlight = function(variant, palette)
-- palette.current: palette of current variant(overridden)
-- palette.dark_base: palette of original dark
-- palette.light_base: palette of original light
-- palette.dark: palette of user overridden dark
-- palette.light: palette of user overridden light
-- Examples:
---@type table<string, vim.api.keyset.highlight>
return {
LspInlayHint = { fg = palette.current.comment, bg = 'none' },
CursorLine = { bg = palette.current.panelBackground },
SymbolUsageText = { fg = palette.current.comment, italic = false },
['@lsp.type.enumMember'] = {
fg = variant:match('dark') and palette.dark_base.digit or palette.light_base.digit,
bold = true,
},
SnacksPickerMatch = { fg = palette.current.property, bold = true },
StatusLine = { bg = palette.current.variable, fg = palette.current.panelBackground },
}
})See: CONTRIBUTING.md

