Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Eva-Theme for NeoVim

License

NotificationsYou must be signed in to change notification settings

sharpchen/Eva-Theme.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Snipaste_2024-08-14_20-20-16

☀ Light

Snipaste_2024-08-14_17-42-18

🎨 Palette

darklightsemantic
$\color{#6495EE}{● \#6495EE}$$\color{#437AED}{● \#437AED}$function-like names
$\color{#A78CFA}{● \#A78CFA}$$\color{#7C4DFF}{● \#7C4DFF}$declaration keywords
$\color{#E4BF7F}{● \#E4BF7F}$$\color{#F0AA0B}{● \#F0AA0B}$parameter name and typeparameter
$\color{#FF6AB3}{● \#FF6AB3}$$\color{#EF8ED8}{● \#EF8ED8}$primitive/builtin type names
$\color{#56B7C3}{● \#56B7C3}$$\color{#00BEC4}{● \#00BEC4}$type names, arithmetic operators
$\color{#98C379}{● \#98C379}$$\color{#53A053}{● \#53A053}$string context
$\color{#B0B7C3}{● \#B0B7C3}$$\color{#5D5D5F}{● \#5D5D5F}$variable
$\color{#FF9070}{● \#FF9070}$$\color{#FF6D12}{● \#FF6D12}$numbers, constants
$\color{#CF68E1}{● \#CF68E1}$$\color{#C838C6}{● \#C838C6}$flow control keywords, boolean literal, null literal,keyword operators
$\color{#E06C75}{● \#E06C75}$$\color{#CD6069}{● \#CD6069}$object members/properties, namespaces/modules
$\color{#676E95}{● \#676E95}$$\color{#A9A9AA}{● \#A9A9AA}$comment
$\color{#F02B77}{● \#F02B77}$$\color{#FA278E}{● \#FA278E}$builtin variables likeself,super,this,base

🛠 Installation

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'}

🎯 Usage

VimScript

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

Lua

vim.cmd.colo'Eva-Dark'-- or any variant

⚙ Options

Override palette

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'-- ...    }  }})

Override highlight

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.highlight
    • variant: theme name such asdark_bold,dark_italic_bold
    • palette: 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  },})

Ambiguity issue

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,    },  },)

Contributing

See:CONTRIBUTING.md


[8]ページ先頭

©2009-2025 Movatter.jp