vim / colorschemes

colorschemes for Vim
279 stars 23 forks source link

fix: check_colors #119

Closed habamax closed 2 years ago

habamax commented 2 years ago
romainl commented 2 years ago

Are we sure check number 4 (&t_Co) is really necessary?

habamax commented 2 years ago

Are we sure check number 4 (&t_Co) is really necessary?

Probably not -- I have just ported existing one without analyzing whether they are needed or not

habamax commented 2 years ago

Does it make sense to have check against what we expect from the colorscheme generated with colortemplate?

  1. it should have all needed highlight groups for both light and dark backgrounds if both are used
  2. it should have definitions for gui, 256 and 16 colors
  3. terminal colors (g:terminal_ansi_colors)
  4. ...?
romainl commented 2 years ago

About check 4…

Colorschemes generated via colortemplate are one scenario but it is very reasonable, I think, to assume that the script will be run against handwritten colorschemes that may or may not have all the bells and whistles. A GUI-only colorscheme without &t_Co checks may not pass our filter but it could nonetheless be a perfectly valid colorscheme.

Maybe we can split: Errors vs Warnings?

habamax commented 2 years ago

Depends on the usecase: whether we only need this check_colors for our repo and whether we require both gui and at least 256c fallback...

romainl commented 2 years ago

IMO, if check_colors is only meant for this repo, then it should be optimised for strictness. If we want it to be useful outside of this repo, then some rules may be "lightened". Here is how I see it:

Errors in all scenarios:

Those checks are purely technical and are not affected by/don't compromise creativity.

Warnings outside of this repo:

Those checks are also technical but they affect/can be affected by creative choices.

Now is it a direction we are comfortable with? On one hand that would make the script useful for people who don't intend to submit their colorscheme for approval. On the other hand that would make it more complex and less useful for us.

A possible middle ground would be to make every check mandatory while prepending some header to the output that puts a few things in perspective.

habamax commented 2 years ago

Is it ok to merge?

romainl commented 2 years ago

What about the g:terminal_ansi_colors check? Do you already have an idea of how you want to do it?

habamax commented 2 years ago

What about the g:terminal_ansi_colors check? Do you already have an idea of how you want to do it?

I will have to think about it