- Notifications
You must be signed in to change notification settings - Fork3
sharpchen/Eva-Theme.nvim
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A semantic coloring code colorscheme forNeoVim ported fromEva-Theme
Supports both Dark and Light modes, with four styles available for each mode: Normal, Bold, Italic, and Italic Bold.
| dark | light | semantic |
|---|---|---|
| function-like names | ||
| declaration keywords | ||
| parameter name and typeparameter | ||
| primitive/builtin type names | ||
| type names, arithmetic operators | ||
| string context | ||
| variable | ||
| numbers, constants | ||
| flow control keywords, boolean literal, null literal,keyword operators | ||
| object members/properties, namespaces/modules | ||
| comment | ||
builtin variables likeself,super,this,base |
Note
For implementation downside, Eva-Theme.nvim uses file cache compilation to improve loading speed.Use:EvaCompile command to compile new cache if necessary.
{'sharpchen/Eva-Theme.nvim',lazy=false,priority=1000,build=':EvaCompile'}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-Bold
vim.cmd.colo'Eva-Dark'-- or any variant
Specify colors for dark and light variants, specified values will be taken while the rest remains default.
Tip
For palette structure, see:palette.luaOr uselazydev.nvim to get completions from type annotations.
require('Eva-Theme').setup({override_palette= {dark= {background='#14161B',-- ... },light= {declarative='#RRGGBB'-- ... } }})
To customize any highlight group for each variants, you can use
- value pairs
[Eva-Theme.ThemeName]: table<string, vim.keyset.highlight> - function callbacks
[string]: fun(variant: Eva-Theme.ThemeName, palette: Eva-Theme.Palette): vim.keyset.highlightvariant: theme name such asdark_bold,dark_italic_boldpalette: the palette overridden afteroverride_palette
require('Eva-Theme').setup({override_highlight= {--#region using callbacks can be more flexible ['@foo.bar.baz']=function(variant,_)return {fg=variant=='dark_bold'and'#RRGGBB'or'#RRGGBB'}end,LspInlayHint=function(_,palette)return {fg=palette.comment,bg='none'}-- use `none` to cancel the default valueend--#endregion },})
This port was intended to respect theupstream where operators got different colors by their usages.While treesitter parsers generally don't classify operator into different usages, so there's no much I can do(might be approachable by treesitter query but I've not got time to learn it).If you find ambiguity between operator and type(pointer typeT* for example), I suggest customize by yourself.
For example:
require('Eva-Theme').setup({override_palette= {dark= {operator=require('Eva-Theme.palette').dark_base.punctuation, },light= {operator=require('Eva-Theme.palette').light_base.punctuation, }, },)
See:CONTRIBUTING.md
About
Eva-Theme for NeoVim
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.

