Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No color Highlights on neoVim #1

Open
thgoncalves opened this issue Apr 10, 2024 · 2 comments
Open

No color Highlights on neoVim #1

thgoncalves opened this issue Apr 10, 2024 · 2 comments

Comments

@thgoncalves
Copy link

Hey.. that's a great Plugin. I like the idea of having a plugin to remember all my custom Keymaps

Question: I don't see any color on my Cheatsheet. Do you have any suggestions? I am using Catppuccin and when I tried NvChad I also used Catppuccin and I was able to see colors an highlights

image

Thanks for the great work

@Onefabis
Copy link

Onefabis commented Apr 23, 2024

Hey, @thgoncalves, I found that workaround: you need to overwrite the highlight group for each color presented in the description of that plugin https://neovim.io/doc/user/api.html#nvim_set_hl()
It is better to setup that highlight group in the color theme that you've installed for your neovim. So here is the example of the code for kanagawa theme that installed on my neovim. This is the Lazy representation of the plugin, so you need to tweak it for your package manager if it's not Lazy.

local function color(name, bgcolor, fgcolor)
	vim.api.nvim_set_hl(0, name, { bg = bgcolor, fg = fgcolor })
end
return {
	"rebelot/kanagawa.nvim",
	priority = 1000,
	config = function()
		require("kanagawa").setup({
			overrides = function(colors)
				return {
					color("NvChAsciiHeader", colors.palette.sumiInk3, colors.palette.fujiWhite), -- Title
					color("NvChSection", colors.palette.sumiInk2), -- Each card
					color("NvCheatsheetWhite", colors.palette.oldWhite, colors.palette.sumiInk3),
					color("NvCheatsheetGray", colors.palette.dragonGray, colors.palette.sumiInk3),
					color("NvCheatsheetBlue", colors.palette.dragonBlue2, colors.palette.sumiInk3),
					color("NvCheatsheetCyan", colors.palette.lotusCyan, colors.palette.sumiInk3),
					color("NvCheatsheetRed", colors.palette.waveRed, colors.palette.sumiInk3),
					color("NvCheatsheetGreen", colors.palette.springGreen, colors.palette.sumiInk3),
					color("NvCheatsheetOrange", colors.palette.surimiOrange, colors.palette.sumiInk3),
					color("NvCheatsheetPurple", colors.palette.dragonPink, colors.palette.sumiInk3),
					color("NvCheatsheetMagenta", colors.palette.dragonPink, colors.palette.sumiInk3),
					color("NvCheatsheetYellow", colors.palette.boatYellow1, colors.palette.sumiInk3),
				}
			end,
			colors = {
				palette = {
					-- change all usages of these colors
					sumiInk3 = "#14141a", -- main background color
					sumiInk4 = "#14141a", -- line number background color
					sumiInk2 = "#1c1c25", -- cheatsheet column color
				},
			},
		})
		vim.cmd.colorscheme("kanagawa-wave")
	end,
}

So here how it looks:
изображение

@smartinellimarco
Copy link
Owner

@thgoncalves Were you able to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants