This PR came about because I sometimes switch between light and dark backgrounds, while also having overridden some highlight groups. The former capabilities allowed there to be only one set of overrides. This PR adds the ability to define a function that will run each time the 'background' setting changes. Using an appropriate if statement then returns the necessary table of highlight groups. In actuality, any logic can be used in the function, as long at it returns something that can be used by require 'ayu'.colorscheme().
This PR came about because I sometimes switch between light and dark backgrounds, while also having overridden some highlight groups. The former capabilities allowed there to be only one set of overrides. This PR adds the ability to define a function that will run each time the
'background'
setting changes. Using an appropriateif
statement then returns the necessary table of highlight groups. In actuality, any logic can be used in the function, as long at it returns something that can be used byrequire 'ayu'.colorscheme()
.