rktjmp / lush.nvim

Create Neovim themes with real-time feedback, export anywhere.
MIT License
1.44k stars 47 forks source link

Cterm colors #93

Open oncomouse opened 2 years ago

oncomouse commented 2 years ago

I was hoping to generate cterm colors (ctermfg and ctermbg) in a theme I'm working on. This should be everything needed to get it working.

rktjmp commented 2 years ago

Thanks for the PR!

I am a bit split on this, as we originally intentionally ignored support for cterm* because it added key ambiguity. Now that we support a looser attribute list, more in-line with nvim_set_hl, it feels like the support should be there.

If we add support for ctermfg/bg we should also support the cterm attribute map. It's unclear what the correct behaviour is when provided separate bold = true attributes in this case. Should they be merged into a cterm key in the exporter? How can we know when to include that value and when to not (as most of the time people probably dont want it generating noise, and defaulting it to cterm=NONE is also probably incorrect.)

I think, probably we just say cterm, ctermfg and ctermbg are not "officially supported" but the key-values are passed through as a kindness if the user provides them.

Can you also add:

ruler501 commented 1 year ago

The import script should probably be updated to go along with this change as well.