-
Notifications
You must be signed in to change notification settings - Fork 241
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
Add option to skip file-type specific colors #119
Conversation
When turned on, this should fix the problem with the color scheme pollitung filetype-specific highlight groups that are by default linked to more generic groups at the cost of disabling all filetype-specific colouring from the theme. It can be switched on by setting g:only_generic_hl to a truthy value before loading the colourscheme.
aaaaah, I am dumb, I forgot to check |
The colorscheme (obviously) needs to check if the variable even exists before checking if it's truthy :|
There are so many diff lines in the PR. Probably caused by your auto indentation, but still, it's hard to see the actual changes that way. Please limit to only the necessary lines to change. |
@NLKNguyen Try |
@pickfire @NLKNguyen That's actually not even necessary; you can view the word diff within github |
The last fix was still flawed, in that it required the variable to be set (to 0) in order to execute the filetype-specific colors block. This version is tested to work with - Undefined variable (use colors) - Variable defined to 0 (use colors) - Variable defined to non-0 (don't use colors)
exec 'hi pythonBuiltinFunc' . s:fg_foreground | ||
exec 'hi pythonBuiltinObj' . s:fg_foreground | ||
endif | ||
if !exists('g:only_generic_hl') || !g:only_generic_hl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable has to be specifically set before using the colorscheme or it will do nothing. This behavior secures that nothing will change for users who don't specifically want it to.
The whole PR still looks like 800+ lines changes and only the last commit of the sequence has little change. I'm not sure the effect of pulling in. Please make another PR that only has a few lines changed. Thanks! |
I will do that then, but since it's basically surrounding a few hundred lines with an |
Yes, I will reindent or find a workaround. I wish the diff can show only the indentation added and not the whole line changed. It helps my review if the diff is small. Thanks! |
This is an attempt to fix #65 (or at least offer a workaround) for people who often switch between color schemes and don't want to use an additional plugin to manage them. It does nothing by default and needs to be specifically activated by setting
g:only_generic_hl
before activating the colorscheme (for example in the users vimrc)When turned on, this should fix the problem with the color scheme
pollitung filetype-specific highlight groups that are by default linked
to more generic groups at the cost of disabling all filetype-specific
colouring from the theme.
It can be switched on by setting g:only_generic_hl to a truthy value
before loading the colourscheme.