The VSCode's Chandrian theme by narenranjit, ported to nvim based on the semantically-aware code from navarasu's OneDark theme.
It uses the Chandrian theme colors when the language can be semantically parsed through treesitter, and uses OneDark as a fallback (and also for other file types, like markdown).
Requires neovim >= 0.5.
WHY: The Chandrian colorscheme colors your control-flow statements (if, for, return) in warm colors, and everything else in cool colors, making your program's flow identifiable through a single glance.
Install via your favourite package manager
" Using Vim-Plug
Plug 'yogeshdhamija/chandrian-theme.nvim'
-- Using Packer
use 'yogeshdhamija/chandrian-theme.nvim'
-- Lua
require('chandrian').load()
" Vim
colorscheme chandrian
-- Lua
require('chandrian').setup {
-- Main options --
style = 'dark', -- Currently the only option, and the default
transparent = false, -- Show/hide background
term_colors = true, -- Change terminal color as per the selected theme style
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
-- toggle theme style ---
toggle_style_key = '<leader>ts', -- Default keybinding to toggle
toggle_style_list = {'dark'}, -- Currently the only option
-- Change code style ---
-- Options are italic, bold, underline, none
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
code_style = {
comments = 'italic',
keywords = 'none',
functions = 'none',
strings = 'none',
variables = 'none'
},
-- Custom Highlights --
colors = {}, -- Override default colors
highlights = {}, -- Override highlight groups
-- Plugins Config --
diagnostics = {
darker = false, -- darker colors for diagnostic
undercurl = true, -- use undercurl instead of underline for diagnostics
background = true, -- use background color for virtual text
},
}
Chandrian can be configured also with Vimscript, using the global dictionary g:chandrian_config
.
NOTE: when setting boolean values use v:true
and v:false
instead of 0 and 1
Example:
let g:chandrian_config = {
\ 'style': 'dark',
\ 'toggle_style_key': '<leader>ts',
\ 'ending_tildes': v:true,
\ 'diagnostics': {
\ 'darker': v:false,
\ 'background': v:false,
\ },
\ }
colorscheme chandrian
Example custom colors and Highlights config
require('chandrian').setup {
colors = {
bright_orange = "#ff8800", -- define a new color
green = '#00ffaa', -- redefine an existing color
},
highlights = {
TSKeyword = {fg = '$green'},
TSString = {fg = '$bright_orange', bg = '#00ff00', fmt = 'bold'},
TSFunction = {fg = '#0000ff', sp = '$cyan', fmt = 'underline,italic'},
}
}
To Enable the
theme for Lualine
, specify theme as chandrian
:
require('lualine').setup {
options = {
theme = 'chandrian'
-- ... your lualine config
}
}
- TreeSitter
- LSPDiagnostics
- NvimTree
- Telescope
- WhichKey
- Dashboard
- Lualine
- GitGutter
- GitSigns
- VimFugitive
- DiffView
- Hop
Pull requests are welcome 🎉👍.