One idea could be to allow declaring custom expansion types.
declare-expansion lua '/usr/bin/lua'
evaluate-commands %lua{ print("set-option makecmd '" .. os.getenv'kak_buffile' .. "'") }
Of course, this is just a shorter and more efficient version of %sh{!#/usr/bin/lua ...}
, so maybe the value add is not large enough…