🌊 KANAGAWA.nvim 🌊
NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.
Installation
Download with your favorite package manager.
use "rebelot/kanagawa.nvim"
Requirements
- neovim >= 0.6
- truecolor terminal support
- undercurl terminal support (optional)
Usage
As simple as writing (pasting)
colorscheme kanagawa
vim.cmd("colorscheme kanagawa")
Plugin Support
- Cmp
- TreeSitter
- LSP Diagnostics
- Git Signs
- Telescope
- NvimTree
- Indent Blankline
- Dashboard
- Lualine
- FloaTerm
- dap-ui
- Notify
And many others should "just work"!
Configuration
There is no need to call setup if you are ok with the defaults.
-- Default options:
require('kanagawa').setup({
undercurl = true, -- enable undercurls
commentStyle = { italic = true },
functionStyle = {},
keywordStyle = { italic = true},
statementStyle = { bold = true },
typeStyle = {},
variablebuiltinStyle = { italic = true},
specialReturn = true, -- special highlight for the return keyword
specialException = true, -- special highlight for exception handling keywords
transparent = false, -- do not set background color
dimInactive = false, -- dim inactive window `:h hl-NormalNC`
globalStatus = false, -- adjust window separators highlight for laststatus=3
terminalColors = true, -- define vim.g.terminal_color_{0,17}
colors = {},
overrides = {},
theme = "default" -- Load "default" theme or the experimental "light" theme
})
-- setup must be called before loading
vim.cmd("colorscheme kanagawa")
Light and default themes may also be changed by setting the background
option.
Note that if the option is set, its value will override and change the theme
field the configuration.
To set a theme other than default
or light
you must disable this setting.
:set background=dark " default theme
:set background=light " light theme
" disable the setting
:set background=
Customize highlight groups and colors
You can change the colors of existing hl-groups as well as creating new ones.
Supported keywords are the same for :h nvim_set_hl
{val}
parameter.
You can define your own colors or use the theme colors (see example below). All the palette colors can be found here.
Example:
local default_colors = require("kanagawa.colors").setup()
-- this will affect all the hl-groups where the redefined colors are used
local my_colors = {
-- use the palette color name...
sumiInk1 = "black",
fujiWhite = "#FFFFFF",
-- ...or the theme name
bg = "#272727",
-- you can also define new colors if you want
-- this will be accessible from require("kanagawa.colors").setup()
-- AFTER calling require("kanagawa").setup(config)
new_color = "teal"
}
local overrides = {
-- create a new hl-group using default palette colors and/or new ones
MyHlGroup1 = { fg = default_colors.waveRed, bg = "#AAAAAA", underline = true, bold = true, guisp="blue" },
-- override existing hl-groups, the new keywords are merged with existing ones
VertSplit = { fg = default_colors.bg_dark, bg = "NONE" },
TSError = { link = "Error" },
TSKeywordOperator = { bold = true},
StatusLine = { fg = my_colors.new_color }
}
require'kanagawa'.setup({ overrides = overrides, colors = my_colors })
vim.cmd("colorscheme kanagawa")
Example for Global Statusline. Note: it works really nice with dimInactive = true
option.
vim.opt.laststatus = 3
vim.opt.fillchars:append({
horiz = '━',
horizup = '┻',
horizdown = '┳',
vert = '┃',
vertleft = '┨',
vertright = '┣',
verthoriz = '╋',
})
require'kanagawa'.setup({ globalStatus = true, ... })
vim.cmd("colorscheme kanagawa")
Color palette
Extras
- alacritty
- base16
- broot
- fish
- foot
- iTerm
- kitty
- mintty
- pywal
- wezterm
- Windows Terminal
- Xresources
- 🎉 Bonus! You win a tiny python script🐍 to extract color palettes 🎨 from any image! 🥳
Acknowledgements
Related projects
- kanagawa.vim - unaffiliated vimscript port of kanagawa.nvim
Donate
Buy me coffee and support my work ;)