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

Error saying Invalid highlight name: diffDeleted #97

Open
Kindlewing opened this issue Dec 29, 2022 · 5 comments
Open

Error saying Invalid highlight name: diffDeleted #97

Kindlewing opened this issue Dec 29, 2022 · 5 comments

Comments

@Kindlewing
Copy link

I'm following the cookbook for a bootstrap statusline and in the colors variable, diffDeleted is invalid.

@rebelot
Copy link
Owner

rebelot commented Dec 31, 2022

make sure that you load heirline AFTER the colorscheme. diffDeleted is not a standard highlight name, but is commonly used by plugins providing git diffs and most colorschemes will define it. If your colorscheme does not define it, you can fall back to another hlgroup

@ishwar00
Copy link
Contributor

ishwar00 commented Jan 6, 2023

@Kindlewing

I faced the same problem, A workaround is

vim.cmd.colorscheme "kanagawa"

-- whole hairline config

vim.cmd.colorscheme "catppuccin"  -- your colorscheme, I wanted catppuccin

kanagawa fills missing colors.

@ishwar00
Copy link
Contributor

ishwar00 commented Jan 7, 2023

@Kindlewing

I faced the same problem, A workaround is

vim.cmd.colorscheme "kanagawa"

-- whole hairline config

vim.cmd.colorscheme "catppuccin"  -- your colorscheme, I wanted catppuccin

kanagawa fills missing colors.

Excuse me, that does not work. I don't remember how I came up with that though. I was using kanagawa all along, xD.

@ghost
Copy link

ghost commented Jan 12, 2023

Just check out your theme, see what is the name for that, and then use that. For instance, catppuccin's highlight group names.

https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/groups/syntax.lua#L67

And also make sure colorscheme is loaded first.

@sbatial
Copy link

sbatial commented Dec 25, 2023

You probably have to define the aliases you want to use yourself as described in the cookbook: https://github.com/rebelot/heirline.nvim/blob/master/cookbook.md#colors-colors-more-colors

I also thought the other aliases would be automatically assigned but that does not seem to be the case according to my experiments/understanding of the code

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

4 participants