rktjmp / lush.nvim

Create Neovim themes with real-time feedback, export anywhere.
MIT License
1.45k stars 47 forks source link

Group linking from required spec fails without additional property #9

Closed rktjmp closed 3 years ago

rktjmp commented 3 years ago

Should work:

local banana = require('lush_theme.banana')
return lush(function(){
  Normal { banana.Normal } -- nil effect
})

but the props aren't inherited without setting a prop along side:

local banana = require('lush_theme.banana')
return lush(function(){
  Normal { banana.Normal, fg = banana.Normal.fg }
})

Regular inheritance linking does work without additional properties

return lush(function(){
  Normal { fg=... },
  Comment { Normal }
})
rktjmp commented 3 years ago

Note this still ends up being a link group, which will give you nil result unless you actually define that group somewhere. Possibly an option to tell the compiler to compile out any links to actual definitions might be wanted. Unclear on performance or plugin interoperability implications.