amit-chaudhari1 / karma.nvim

A Neovim color theme inspired by Karma for VS Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ™ Karma

Screenshot of Karma, split between the light and dark mode

⚑️ Requirements

  • Neovim >= 0.5.0

πŸ“¦ Installation

Install the theme with your preferred package manager:

With vim-plug:

Plug 'amitchaudhari9121/karma.nvim', { 'branch': 'main' }

With packer:

use 'amitchaudhari9121/karma.nvim'

πŸš€ Usage

Enable the colorscheme:

" Enable karma in Vim Script
colorscheme karma
-- Enable karma colorscheme in lua
vim.cmd[[colorscheme karma]]

To enable the Karma theme for Lualine, simply specify it in your lualine settings:

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

To enable the karma colorscheme for lightline:

" Vim Script
let g:lightline = {'colorscheme': 'karma'}

❗️ Note: if you are using tmux or similar multiplexers , please make sure that you add these for a color accurate experience of karma.nvim

replace XXX with the output of echo $TERM

set-option -sa terminal-overrides ',XXX:RGB' # newer versions of tmux
set-option -ga terminal-overrides ',XXX:Tc'  # older versions of tmux 

βš™οΈ Configurationn

❗️ You must set the configuration BEFORE loading the color scheme with colorscheme karma

The themes come with a darker night variant, and a lighter day theme.

For instance, you could set the theme to day by:

  • vim.g.karma_style == "day"
  • vim.o.background == "light"
Option Default Description
karma_style "storm" The theme comes in two styles a darker variant night and day.
karma_terminal_colors true Configure the colors used when opening a :terminal in Neovim
karma_italic_comments true Make comments italic
karma_italic_keywords true Make keywords italic
karma_italic_functions false Make functions italic
karma_italic_variables false Make variables and identifiers italic
karma_transparent false Enable this to disable setting the background color
karma_hide_inactive_statusline false Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard StatusLine and LuaLine.
karma_sidebars {} Set a darker background on sidebar-like windows. For example: ["qf", "vista_kind", "terminal", "packer"]
karma_transparent_sidebar false Sidebar like windows like NvimTree get a transparent background
karma_dark_sidebar true Sidebar like windows like NvimTree get a darker background
karma_dark_float true Float windows like the lsp diagnostics windows get a darker background.
karma_colors {} You can override specific color groups to use other groups or a hex color
karma_day_brightness 0.3 Adjusts the brightness of the colors of the Day style. Number between 0 and 1, from dull to vibrant colors
karma_lualine_bold false When true, section headers in the lualine theme will be bold
-- Example config in Lua
vim.g.karma_style = "night"
vim.g.karma_italic_functions = true
vim.g.karma_sidebars = { "qf", "vista_kind", "terminal", "packer" }

-- Change the "hint" color to the "yellow2" color, and make the "error" color bright red
vim.g.karma_colors = { hint = "yellow2", error = "#ff0000" }

-- Load the colorscheme
vim.cmd[[colorscheme karma]]
" Example config in VimScript
let g:karma_style = "night"
let g:karma_italic_functions = 1
let g:karma_sidebars = [ "qf", "vista_kind", "terminal", "packer" ]

" Change the "hint" color to the "yellow2" color, and make the "error" color bright red
let g:karma_colors = {
  \ 'hint': 'yellow2',
  \ 'error': '#ff0000'
\ }

" Load the colorscheme
colorscheme karma

Making undercurls work in tmux

To have undercurls show up and in color, add the following to your tmux config file:

# Undercurl
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0

Info

This theme is a port of karma.

Much of the Lua util and color assigning is inspired by NightFox.nvim and tokyonight.nvim.

✨ Features

  • Supports the latest Neovim 5.0 features like TreeSitter and LSP
  • Minimal inactive statusline
  • Vim terminal colors
  • Darker background for sidebar-like windows
  • Lualine theme

Plugin Support

🎨 Palette

Karma's color palette

πŸ”₯ Contributing

Pull requests are welcome.

I know this theme is not as polished right now as it can be, nor can I test the theme on every terminal I know of. Users are encouraged to create and file an issue about any problems they've faced.

About

A Neovim color theme inspired by Karma for VS Code

License:MIT License


Languages

Language:Lua 99.2%Language:Vim Script 0.8%