Shatur / neovim-ayu

Ayu theme for Neovim.
GNU General Public License v3.0
430 stars 45 forks source link

Allow defining a function to create the overrides table. #10

Closed PhilRunninger closed 2 years ago

PhilRunninger commented 2 years ago

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().