@@ -187,7 +187,7 @@ Group.is_existing_group = function(key)
187187 return _group_hash [string.lower (key )] ~= nil
188188end
189189
190- Group .__private_create = function (name , fg , bg , style , guisp , default , bang )
190+ Group .__private_create = function (name , fg , bg , style , guisp , blend , default , bang )
191191 name = string.lower (name )
192192
193193 local handler = {}
@@ -229,6 +229,7 @@ Group.__private_create = function(name, fg, bg, style, guisp, default, bang)
229229 obj .bg = bg_color
230230 obj .style = style_style
231231 obj .guisp = guisp_color
232+ obj .blend = blend
232233
233234 obj :update ()
234235 else
@@ -245,6 +246,7 @@ Group.__private_create = function(name, fg, bg, style, guisp, default, bang)
245246 bg = bg_color ,
246247 style = style_style ,
247248 guisp = guisp_color ,
249+ blend = blend ,
248250
249251 children = {
250252 fg = {},
@@ -289,12 +291,12 @@ Group.__private_create = function(name, fg, bg, style, guisp, default, bang)
289291 return obj
290292end
291293
292- Group .default = function (name , fg , bg , style , guisp , bang )
293- return Group .__private_create (name , fg , bg , style , guisp , true , bang )
294+ Group .default = function (name , fg , bg , style , guisp , blend , bang )
295+ return Group .__private_create (name , fg , bg , style , guisp , blend , true , bang )
294296end
295297
296- Group .new = function (name , fg , bg , style , guisp )
297- return Group .__private_create (name , fg , bg , style , guisp , false , false )
298+ Group .new = function (name , fg , bg , style , guisp , blend )
299+ return Group .__private_create (name , fg , bg , style , guisp , blend , false , false )
298300end
299301
300302Group .link = function (name , linked_group )
@@ -321,14 +323,15 @@ function Group:apply()
321323 Example: >
322324 :hi comment guifg='salmon pink'
323325 --]]
326+
324327 -- Only clear old highlighting if we're not the default
325328 if self .__default__ == false then
326329 -- Clear the current highlighting
327330 vim .api .nvim_command (string.format (" highlight %s NONE" , self .name ))
328331 end
329332
330333 -- Apply the new highlighting
331- vim . api . nvim_command ( string.format (
334+ local command = string.format (
332335 " highlight%s %s %s guifg=%s guibg=%s gui=%s guisp=%s" ,
333336 execute .fif (self .__bang__ , " !" , " " ),
334337 execute .fif (self .__default__ , " default" , " " ),
@@ -337,7 +340,13 @@ function Group:apply()
337340 self .bg :to_rgb (),
338341 self .style :to_nvim (),
339342 self .guisp :to_rgb ()
340- ))
343+ )
344+
345+ if self .blend then
346+ command = command .. string.format (" blend=%s" , self .blend )
347+ end
348+
349+ vim .api .nvim_command (command )
341350end
342351
343352Group .update = function (self , updated )
0 commit comments