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

Add g:choosewin_highlight_on_init to control highlighting #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timfjord
Copy link

This PR adds the g:choosewin_highlight_on_init option that can be used to control highlighting

By default, the plugin highlights control elements on initialisation and overrides any highlighting rules from the $VIMRC
There is a way to specify colours(e.g. g:choosewin_color_label, etc), but it doesn't allow to link to specific highlighting rules
So, for example, this

augroup my_colorscheme
  autocmd!

  autocmd ColorScheme *  hi! link ChooseWinOther MyRule
augroup END

simply gets overridden with the built-in highlighting rules

This PR is more a proof of concept, as I haven't added tests(if any) and documentation
Maybe there is a better way that I am not aware of to achieve this without this PR, so please advise

My original idea was to make this call optional but it looks like we explicitly call call choosewin#color#init() in the choosewin#start

gregorias added a commit to gregorias/vim-choosewin that referenced this pull request Apr 7, 2023
This commit adds the ability to turn off automatic highlight group
setup. This enables colorschemes to override the default settings.

This change is more powerful than
t9md#56, because it gives the user
the control to reenable highlight groups at a later time.
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

Successfully merging this pull request may close these issues.

1 participant