Skip to content

The VSCode Chandrian Theme by narenranjit: https://github.com/narenranjit/chandrian-theme, ported to nvim based on the semantically-aware code from navarasu's onedark theme: https://github.com/navarasu/onedark.nvim/

License

Notifications You must be signed in to change notification settings

yogeshdhamija/chandrian-theme.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chandrian-theme.nvim

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.

Installation

Install via your favourite package manager

" Using Vim-Plug
Plug 'yogeshdhamija/chandrian-theme.nvim'
-- Using Packer
use 'yogeshdhamija/chandrian-theme.nvim'

Screenshots

Screen Shot 2022-06-03 at 3 30 20 PM

Screen Shot 2022-06-03 at 3 26 57 PM

Screen Shot 2022-06-03 at 3 27 32 PM

Configuration

Enable theme

-- Lua
require('chandrian').load()
" Vim
colorscheme chandrian

Default Configuration

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

Vimscript configuration

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

Customization

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

Plugins Configuration

Enable lualine

To Enable the theme for Lualine, specify theme as chandrian:

require('lualine').setup {
  options = {
    theme = 'chandrian'
    -- ... your lualine config
  }
}

Plugins Supported

Contributing

Pull requests are welcome 🎉👍.

License

MIT

About

The VSCode Chandrian Theme by narenranjit: https://github.com/narenranjit/chandrian-theme, ported to nvim based on the semantically-aware code from navarasu's onedark theme: https://github.com/navarasu/onedark.nvim/

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%