rebelot / kanagawa.nvim Goto Github PK
View Code? Open in Web Editor NEWNeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.
License: MIT License
NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.
License: MIT License
This is not an issue. I just want to thank you this amazing colorscheme.
kanagawa
is by far the fastest full featured nvim colorscheme I have ever use. Sub 2ms loading time. 2nd fastest is tokyonight
, around 3ms slower
I don't know what you did under the hood. I hope it stay that way forever.
Thank you!
With neovim/neovim#17266 being merged in it would be nice to have better highlights and drawing characters for splits.
This is what kanagawa looks like right now
As opposed to another colorscheme which implements it e.g. gruvbox or catppuccin
Hi. I tried this lovely theme recently and after applying throws me an error:
Error detected while processing /home/mauridevs/.local/share/nvim/site/pack/packer/start/kanag awa.nvim/colors/kanagawa.vim: line 1: W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name W18: Invalid character in group name Press ENTER or type command to continue
Tried other themes and this issue doesn't happen.
I noticed that the colors won't apply in the numbers and the ~
(empty line char) still appears as blue (see image below).
Config:
Nvim 0.7.2
PopOS 22.04
I have been using kanagawa for about a week now, and I'm really enjoying it, however, I have two things that make me want to move to a different colorscheme:
Great work on this!
May you add colors for Cmp Highlight groups:
CmpItemKindMethod
CmpItemKindFunction
CmpItemKindConstructor
CmpItemKindField
CmpItemKindClass
CmpItemKindInterface
CmpItemKindModule
CmpItemKindProperty
CmpItemKindValue
CmpItemKindEnum
CmpItemKindKeyword
CmpItemKindSnippet
CmpItemKindFile
CmpItemKindEnumMember
CmpItemKindConstant
CmpItemStruct
CmpItemKindStruct
CmpItemKindTypeParameter
Colors in Cmp-Popup make that menu nicer and allows selecting needed variant faster (at least for me).
Thanks for creating this nice colorscheme!
Would you mind by any chance adding a table of your color palette somewhere, probably to README? So that users can easily customize for example their statusline colors using kanagawa's palette.
The table would contain color names (samuraiRed
, etc.), their corresponding HEX values, and actual color images, defined in lua/kanagawa/colors.lua
. I imagine something like this.
So, I've been trying out this colorscheme for a few days now(I absolutely love it btw) and I have stumbled upon this really obtrusive behavior of coloring every single variable red whenever I type in an array the way shown in the image appended. Curiously, it all goes away as soon as I end the line with a semicolon.
Hi,
I'm not sure if this is something useful to you, to implement in kanagawa.
https://www.reddit.com/r/neovim/comments/sihuq7/psa_now_you_can_set_global_highlight_groups_ie/
That line I think that line should be
🎉 Bonus! You win a tiny python script 🐍 to extract color palettes 🎨 from any image! 🥳
tada Bonus! You win a tiny python scriptsnake to extract color palettes art from images! partying_face
Can we have some option like nightfox to dim inactive window. This will help if we have many window/split open.
help NormalNC
At the moment, the difference between NormalFloat
and Normal
is very large. Is there any intention of adding more color options between the two (in the same way we have a lighter gradient of background colors)? Personally, I'd like to see a couple more colors that aren't as high contrast when creating floats (having more options will let users customize certain floats to have different highlights).
Hi, I am currently enjoying the dark colorscheme, just wondering if there are any plans regarding a light mode for those sunny days?
Italics and bold no longer work after the latest commit. I have already made the updates to my config (I'm on v0.7.0):
function M.setup()
local ok, kanagawa = pcall(require, 'kanagawa')
if not ok then
log.error('kanagawa not available', 'Config')
return false
end
vim.g.kanagawa_lualine_bold = true
kanagawa.setup({
undercurl = true,
commentStyle = { italic = true },
functionStyle = { bold = true },
keywordStyle = { bold = true },
statementStyle = { bold = true },
typeStyle = { bold = true },
variablebuiltinStyle = { bold = true },
specialReturn = true,
specialException = true,
transparent = false,
dimInactive = false, -- while shade is broken
globalStatus = true,
colors = {},
overrides = {},
})
vim.cmd('colorscheme kanagawa')
end
Here's what it currently looks like:
Prior to the latest commit (I pinned this commit):
nvim-navic displays code context and has several definable highlight groups documented here . It would be great to get official kanagawa support for this.
Thanks!
Hi!
I'm currently implementing a grammar with LuLPEG and that grammar is defined inside a 1st-Level Literal String. Literal Strings are now highlighted by kanagawa.vim as you can see in the screenshot. Unfortunately, the whole block got repainted if I move the cursor a line up or down, which is very annoying for me. I tried to redefine the colors and highlighting groups as described for this color scheme , but I hadn't any luck.
So, what is the correct configuration for no highlighting of Literal Strings?
If you want to try that by your yourself, this is the code I used in the screenshot:
local mail_pat = [=[
groups <- (group (%s* ([,;] %s*)+ group)*) -> {}
group <- (
{:name: <phrase> :} %s* <addr> /
{:name: <uq_phrase> :} %s* "<" <addr_spec> ">" /
<addr> %s* {:name: <phrase> :} /
"<" <addr_spec> ">" %s* {:name: <uq_phrase> :} /
<addr> /
{:name: <phrase> :}
) -> {}
uq_phrase <- <uq_atom> (%s+ <uq_atom>)*
uq_atom <- [^<>,; ]+
phrase <- <word> ([%s.]+ <word>)* / <quoted_string>
word <- <atom> ! <domain_addr>
atom <- [^] %c()<>@,;:\".[]+
quoted_string <- '"' ([^"\%nl] / "\" .)* '"'
addr <- <addr_spec> / "<" <addr_spec> ">"
addr_spec <- {:addr: <addr_chars> <domain_addr> :}
domain_addr <- "@" <addr_chars>
addr_chars <- [_%a%d][-._%a%d]*
]=]
Really love these colors but just trying to figure out why I am getting way too much fujiWhite
everywhere in my code and the easiest way to make it render more colors based on the built-ins for scala but also applies to all of my java files. Using basic config as follows:
⋅⋅⋅⋅⋅⋅⋅⋅use({
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅"rebelot/kanagawa.nvim",↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅config⋅=⋅function()↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅require("kanagawa").setup({↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅undercurl⋅=⋅true,⋅--⋅enable⋅undercurls↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅commentStyle⋅=⋅"italic",↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅functionStyle⋅=⋅"NONE",↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅keywordStyle⋅=⋅"italic",↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅statementStyle⋅=⋅"bold",↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅typeStyle⋅=⋅"NONE",↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅variablebuiltinStyle⋅=⋅"italic",↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅specialReturn⋅=⋅true,⋅--⋅special⋅highlight⋅for⋅the⋅return⋅keyword↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅specialException⋅=⋅true,⋅--⋅special⋅highlight⋅for⋅exception⋅handling⋅keywords↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅transparent⋅=⋅false,⋅--⋅do⋅not⋅set⋅background⋅color↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅dimInactive⋅=⋅true,⋅--⋅dim⋅inactive⋅regions↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅colors⋅=⋅{},↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅overrides⋅=⋅{},↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅})↴
⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅end,↴
⋅⋅⋅⋅⋅⋅⋅⋅})
The terminal colors (:h terminal-config
) aren't being set currently, so when in terminal mode (I assume) neovim just passes the color codes through to the terminal. This makes for some pretty ugly clashes if e.g. you're currently using a light colorscheme in the terminal (Also, fallback colors in Neovide (a neovim GUI) are pretty gaudy)
It would be nice if kanagawa would set these up in M.load()
The colors I'm talking about are the g:terminal_color_[0..15]
variables. Copying the suggested terminal colors:
local kanagawa = require("kanagawa.colors").setup()
vim.g.terminal_color_0 = "#090618" -- black
vim.g.terminal_color_1 = kanagawa.autumnRed -- red
vim.g.terminal_color_2 = kanagawa.autumnGreen -- green
vim.g.terminal_color_3 = kanagawa.boatYellow2 -- yellow
vim.g.terminal_color_4 = kanagawa.crystalBlue -- blue
vim.g.terminal_color_5 = kanagawa.oniViolet -- magenta
vim.g.terminal_color_6 = kanagawa.waveAqua1 -- cyan
vim.g.terminal_color_7 = kanagawa.oldWhite -- white
vim.g.terminal_color_8 = kanagawa.fujiGray -- bright black
vim.g.terminal_color_9 = kanagawa.samuraiRed -- bright red
vim.g.terminal_color_10 = kanagawa.springGreen -- bright green
vim.g.terminal_color_11 = kanagawa.carpYellow -- bright yellow
vim.g.terminal_color_12 = kanagawa.springBlue -- bright blue
vim.g.terminal_color_13 = kanagawa.springViolet1 -- bright magenta
vim.g.terminal_color_14 = kanagawa.waveAqua2 -- bright cyan
vim.g.terminal_color_15 = kanagawa.fujiWhite -- bright white
vim.g.terminal_color_16 = kanagawa.surimiOrange -- extended color 1
vim.g.terminal_color_17 = kanagawa.peachRed -- extended color 2
#090618
doesn't seem to be specified in kanagawa.colors
so I had to specify it manually.
I have been using your colorscheme for sometime now, but couldn't get to activate the lualine support. I have put the lualine theme option in auto , but the statusline colors seems to muted. Is that it is supposed to be.
Hi there. I saw your theme, loved it but I am an Emacs user so I cloned it.
I will upload it to Melpa (Emacs packages)
https://github.com/konrad1977/emacs/blob/main/themes/kanagawa-theme.el
Do you have any copyright etc you want me to include?
//Mikael
Here is kanagawa.nvim at commit fc2e30820c73b0cf56bb0fb9e4a83dd8b90f9bf4
with nvim-treesitter at commit 4cccb6f494eb255b32a290d37c35ca12584c74d0
(before the removal of obsolete TS*
highlight groups)
Here is a screenshot after the update, self
and TODO:
has no color . kanagawa.nvim at commit a6f8ea10900e8d891f9c93e0ed258f118010fb24
and nvim-treesitter at commit commit b9bcbf8d73b5a6c3e04922936b5fc500b436d4f5
I'm not sure if this is a problem with the kanagawa or with treesitter.
Hello, thank you very much for this amazing colorscheme! Would there be the possibility of supporting searchbox.nvim? Currently, seems a little broken:/
Thanks for the beautiful scheme.
Recently I tried to override and set some highlight groups based on this theme colors palette, and found that I couldn't
get proper code completion from the lua LSP (which sometimes caused misspelling as I has to write them manually),
apparently the cause was since the kanagawa.colors
module returns table from vim.tbl_extend
, not the actual
palette table, my workaround for this is to assign the final result to palette_colors
.
Previously, the completion came from what I wrote for the
c
variable, although it is unrelated
diff --git a/lua/kanagawa/colors.lua b/lua/kanagawa/colors.lua
index baf2fde..9facef9 100644
--- a/lua/kanagawa/colors.lua
+++ b/lua/kanagawa/colors.lua
@@ -67,7 +67,8 @@ function M.setup(config)
local colors = vim.tbl_extend("force", palette_colors, config.colors)
local theme = require("kanagawa.themes")[config.theme](colors)
theme = vim.tbl_extend("force", theme, config.colors)
- return vim.tbl_extend("force", theme, colors)
+ palette_colors = vim.tbl_extend("force", theme, colors)
+ return palette_colors
end
return M
Sure, this has nothing to do with the color scheme, but it's a good DX.
Any plans to have something similar to tokyonight.nvim extras https://github.com/folke/tokyonight.nvim/tree/main/extras particularly fish and tmux?
Thanks for the great colorscheme btw!
Hey, thanks for a great colorscheme. Recently updated my plugins and started getting W18: Invalid character in group name errors. I'm on Neovim 0.7.2 and found this is due the capture group names in 631e0aa where @
was added in a later version. My :h group-name
:
Not sure if you want to update any documentation, maybe tag the previous working commit fc2e308, or have another solution so just reporting it for now. Using { 'rebelot/kanagawa.nvim', commit = 'fc2e308' }
in packer config works for me.
dc51a23 made the background of bufferline white for me, whereas previously it was black. Before and after below:
I don't have a big config for Kanagawa so idk what to change:
vim.opt.laststatus = 3
vim.opt.fillchars:append({
horiz = '━',
horizup = '┻',
horizdown = '┳',
vert = '┃',
vertleft = '┨',
vertright = '┣',
verthoriz = '╋',
})
require('kanagawa').setup({ globalStatus = true, ... })
vim.cmd('colorscheme kanagawa')
Hi, I'm trying to change the default background color, while also using some of the original defaults to customize the existing hl-groups. Here's a minimal config to show what I mean:
local default_colors = require("kanagawa.colors")
local colors = {
sumiInk1 = "#272727", -- new background color
}
local overrides = {
Search = { bg = default_colors.surimiOrange }, -- customize search highlight color
}
require("kanagawa").setup({
overrides = overrides,
colors = colors,
})
vim.cmd("colorscheme kanagawa")
The customizations in overrides
are applied, but the new background color in colors
is not applied. However, this issue is fixed when I define my own colors as such, without reference to default_colors
:
local colors = {
sumiInk1 = "#272727",
surimiOrange = "#FFA066",
}
local overrides = {
Search = { bg = colors.surimiOrange },
}
It seems that reference to default_colors
is overriding my customizations in colors
. Is there another way to do this that I'm missing?
Thank you for creating this colorscheme! I'm really loving it.
Hello! Thank you for the great color scheme.
I'm using diffview to view changes in a file, and noticed that the way the colorscheme is currently configured, those changes are colored as grey and light grey, rather than the colors provided.
This is not ideal, I'd love it to be the traditional red as deleted, green as added, and so forth. Those colors are provided inside the themes.lua
file, do they need to be applied somehow? How could one debug this?
Thanks again!
Hello expert,
Can you please add the vim-plug plugin support to download this theme. Thanks
comment
where it should be fg_comment
:kanagawa.nvim/lua/kanagawa/hlgroups.lua
Line 30 in a7c23b5
kanagawa.nvim/lua/kanagawa/hlgroups.lua
Line 60 in a7c23b5
kanagawa.nvim/lua/kanagawa/hlgroups.lua
Line 384 in a7c23b5
warn
where it should be warning
:kanagawa.nvim/lua/kanagawa/hlgroups.lua
Line 67 in a7c23b5
previously i use something like this local colors = require("kanagawa.colors")
to get the color palette table.
And i can use like this colors.oniViolet
to get specific color, previously no this is problem, but after updating the plugin i always get the null.
how i get color palette for latest version ?
btw i really like this colorscheme.
i'm sorry for my english.
cheers...(UwU)
I found overriding WinBar
highlighting group works randomly.
Even I override WinBar
to { bg = '#000000' }
, WinBar
hlgroup appears to be { fg = '#c8c093' }
most cases.
test.lua
file (this would be minimal init.lua file)vim.o.termguicolors = true
require('kanagawa').setup {
overrides = {
WinBar = { bg = '#000000' },
}
}
vim.cmd('colorscheme kanagawa')
-- some keymaps for making test easy
vim.keymap.set('n', '<space>', function() vim.o.winbar = [[%f]] end)
vim.keymap.set('n', 'q', ':q<CR>')
nvim -u test.lua --no-plugin
nvim -u test.lua --no-plugin
nvim -u test.lua --no-plugin
...
WinBar
highlight group overriding doesn't apply in most casesI checked both neovim v0.8.0 and v0.9.0, but result was same.
Also, I'm pretty curious why this only happens for hlgroup WinBar
. (StatusLine
works fine)
So I've been mainly trying out the dark theme with python. And the syntax highlighting doesn't seem to be working properly.
I'm on Neovim nightly and have the latest Treesitter installed.
Here is an example of the same snipper inside of Pycharm
as a comparison.
So I was wondering about if I have something wrong, or how I might add the missing colours? Are there specific colours that should be applied?
Hello! Thank you for this incredible colorscheme. I'm absolutely loving it so far. I noticed something today which is maybe a bit niche and I've honestly never really thought about the highlight groups that are at play here, but in my own plugin I am often editing my *.txt
help file. When conceallevel
is set to 0 things like *
or |
are pretty impossible to see in various places. I'll give you a couple examples:
*
in headingsNotice it's not visible at all unless you are on top of it
|
Notice here that they are really hard to see by are actually around every command in that list. You also notice in that shot that the "`" is incredible hard to see as well
Let me know if there is anything else I can provide for this. Again, wonderful colorscheme. I'm really really enjoying it so far. Here is a little beauty shot:
After commit a8df1c0, scrollbar from dstein64/nvim-scrollview plugin lost transparency.
With other color themes, there is no such problem.
First of all, thank you so much for this beautiful theme. It is funny when i am picking a scheme; i never really know what im looking for but i just KNOW when i've found the one.
I couldn't help notice you also had a tmux theme which fitted nicely together with kanagawa, if you have time at some point i would love to use it as well.
I have used this color scheme for awhile in neovim but have recently switch to using vscode with vim plugin, any plans to bring this to vscode?
May you add WinBar highlight groups?
My suggestion:
hi WinBar cterm=NONE gui=NONE guibg=#16161d
hi WinBarNC guifg=#727169 guibg=#16161d
Love the colorscheme by the way!
By default, Neogit's highlight groups are difficult to read and have colors that don't mesh well with theme when a hunk is under the cursor:
Seems Neogit highlight groups are commented out by default as well.
I have some overrides that modify the theme to look like this:
Not selected:
Config:
require("kanagawa").setup({
transparent = true,
dim_inactive = true,
globalStatus = true,
overrides = {
NeogitHunkHeader = { bg = colors.diff.text },
NeogitHunkHeaderHighlight = { fg = colors.git.changed, bg = colors.diff.text },
NeogitDiffContextHighlight = { bg = colors.diff.change },
NeogitDiffDeleteHighlight = { fg = colors.git.removed, bg = colors.diff.delete },
NeogitDiffAddHighlight = { fg = colors.git.added, bg = colors.diff.add },
},
})
1.) Wondering if someone else can replicate the colors I'm seeing by default
2.) Wondering if a PR would be welcome to set the defaults if the weird colors can be replicated from defaults?
An error occurs in the nvim-dap-ui plugin when running PackerSync
.
packer.nvim: Error running config for nvim-dap-ui: ...packer/start/nvim-dap-ui/lua/dapui/config/highlights.lua:74: bad argument #2 to 'format' (number expected, got nil)
.
The problem disappears after commenting these highlights:
-- DapUIStop = { link = "Error" }, --guifg=#F70067"
-- DapUIUnavailable = { link = "Comment" }, --guifg=#424242"
I would like to know if it is possible to make some additional parts transparent, such as the command line and the diagnostic sign column. I just think is more consistent if these two fields can be transparent. I am attaching an image to illustrate the current behavior I would like to change.
Very nice theme by the way.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.