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

Highlight Group not Working #21

Closed
axieax opened this issue Nov 1, 2021 · 9 comments
Closed

Highlight Group not Working #21

axieax opened this issue Nov 1, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@axieax
Copy link
Contributor

axieax commented Nov 1, 2021

Not too sure why but set highlight group using either vim.cmd([[highlight BiscuitColor ctermfg=cyan]]) or vim.api.nvim_set_hl(0, "BiscuitColor", { ctermfg = "cyan" }) doesn't seem to work (using lua) - am I doing this wrong?

Here is my config:
image

p.s. is there a way to not automatically decorate_nodes on startup? - i'm currently just calling toggle again in my setup function to disable it

@axieax axieax changed the title Usage questions and feature requests Highlight Group not Working Nov 1, 2021
@cmgriffing
Copy link
Contributor

Interesting. I haven't done any of the vim.cmd stuff yet, so I will have to check that out.

To your second point, I should probably add a config setting to set whether it tries on start or not. Thanks, I will probably be able to put some time into this during the weekend.

@cmgriffing
Copy link
Contributor

I was able to make a PR for the biscuits to be hidden by default for toggle_keybind users.
#24

Let me know if that branch works for you and feel free to comment on the PR letting me know if it works

I will leave this issue open for the main bug related to highlight groups for now.

@axieax
Copy link
Contributor Author

axieax commented Nov 9, 2021

I was able to make a PR for the biscuits to be hidden by default for toggle_keybind users. #24

Let me know if that branch works for you and feel free to comment on the PR letting me know if it works

I will leave this issue open for the main bug related to highlight groups for now.

Hi the PR looks good, thanks for that! Looking forward to seeing the working HL groups soon :))

@cmgriffing cmgriffing added the bug Something isn't working label Nov 9, 2021
@cmgriffing
Copy link
Contributor

Ok, I was finally able to get my local config to use a lua config script.

I don't know what to say but it works on my machine on the latest main branch code.

-- " global color
vim.cmd [[highlight BiscuitColor ctermfg=cyan]]


-- " language specific color
vim.cmd [[highlight BiscuitColorRust ctermfg=red]]
vim.cmd [[highlight BiscuitColorGo ctermfg=35]]

image

@axieax
Copy link
Contributor Author

axieax commented Nov 15, 2021

Interesting, not sure if there's anything wrong with my order of configuration then..

I'm currently on version 0.5.1. Appreciate the effort!!

@cmgriffing
Copy link
Contributor

I will see if I can reproduce by switching how I do my config to look closer to yours. (plugins folder, etc). Probably won't be able to try til next week though. I'm going to leave this issue open for tracking it though.

@axieax
Copy link
Contributor Author

axieax commented Nov 22, 2021

Appreciate the efforts! Not sure if this helps, but I had a similar issue with highlight groups for indent-blankline.nvim not being set (well being overriden). It turned out that my theme material.nvim overwrote my highlights. I've checked my themes already and could not find any which would overwrite this highlight group, so not too sure what to do from here ahaaha

@cmgriffing
Copy link
Contributor

I feel like its been a while. @axieax is there any chance that this has been resolved in the mean time? No worries if not. Just wanted to double check on the status of this issue.

@axieax
Copy link
Contributor Author

axieax commented Mar 28, 2023

Oh yes sorry forgot to close this issue, but it has been resolved. I believe setting it via a ColorScheme autocmd, or defining it within a colorscheme's config options should work as well, although I no longer have a need for this so am not sure atm.

@axieax axieax closed this as completed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants