Kakoune scripting is very flexible but needs to be triggered by the shell, quite interesting how that goes...