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

cost of g:solarized_extra_hi_groups=0 #59

Closed
bam80 opened this issue Mar 6, 2019 · 6 comments
Closed

cost of g:solarized_extra_hi_groups=0 #59

bam80 opened this issue Mar 6, 2019 · 6 comments

Comments

@bam80
Copy link

bam80 commented Mar 6, 2019

Thanks for the scheme.
Could you please explain what we actually sacrifice if keep those "Solarized filetype-specific syntax highlighting groups"(whatever it means) disabled?

@lifepillar
Copy link
Owner

lifepillar commented Mar 6, 2019

The original Solarized defines many additional highlight groups for specific filetypes. In Solarized 8, you can find them in templates/_extra.colortemplate. For example, in HTML buffers, dark Solarized defines htmlTag to use #586e75 as foreground color, whilehtmlTag by default would use #268bd2. So, if you enable filetype-specific highlight groups, you will see slightly different colors for some filetypes. If you don't, you will just see the default ones (i.e., those specified by the corresponding filetype plugins). Such adjustments were likely proposed by users of the colorscheme (“look, the colorscheme looks fine everywhere, except that I would prefer HTML tags using this color rather than that”). Since Solarized has a huge community, with time a lot of tweaks were added.

Unfortunately, defining filetype-specific highlight groups in a colorscheme may leave a wave of destruction when switching to another colorscheme. For this reason, in my fork they are disabled by default; they may be enabled for backward compatibility and for users who don't care (e.g., because they use Solarized exclusively).

@bam80
Copy link
Author

bam80 commented Mar 6, 2019

Many thanks for the explanation!

Can it be the case that those adjustments are needed due nature of the scheme, or it just huge community which matters?
E.g., in standard scheme I never saw any inconsistencies I would like to fix

@lifepillar
Copy link
Owner

Mostly just personal taste, e.g., some people like more colorful syntax highlighting in Git commit buffers.

My suggestion is that if you want to override a colorscheme’s choice of colors for some filetype, do it in your own configuration or ask the maintainer of the filetype’s plugin.

@lifepillar
Copy link
Owner

And no, I think the colorscheme looks fine for most, if not all, filetypes. Of course, if you live, say, in pandoc buffers, you may see room for improvement. But adding filetype-specific tweaks in a colorscheme is not the correct solution (at least, it is not currently supported by Vim).

The issue I’ve linked to above has been discussed in Vim’s mailing list as well. I don’t recall the details, but if you search hard enough, you’ll find some interesting discussions.

@bam80
Copy link
Author

bam80 commented Mar 6, 2019

Yes, I saw the linked issue, but it is too long to read it all.
Am I understand right those filetype-specific tweaks was maybe mesdesign from the beginning in Solarized scheme? But since the issue is still open, probably Solarized author is not fully agree with that..
Anyway, I think this issue here is resolved enough, so we can close it.
Thanks!

@lifepillar
Copy link
Owner

Yes, it is a mis-design in the sense that it is not really well supported by Vim (some argue that it is Vim that should be fixed). As for the linked issue being still open: AFAICS, Solarized is not in active development any longer.

Anyway, happy Vimming!

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

2 participants