Regarding the use of
jlnt, we can extract the code using them to the tools directory. There are other languages defining commands using external tools there.
That part is trickier, and it sets a hard dependency on the
janet program, making highlighting Janet code on machines without it impossible.
But, personally, I see another problem in that solution: it highlights every binding as a
keyword, even functions and macros, something that doesn’t seem quite right (at least to my taste; obviously it’s OK if you think differently). What I opted to do for the Kakoune repository is highlight as keyword only Janet’s special forms. Except for those, everything else that looks like a function call (including calling functions, macros and methods) is highlighted as
function, and doesn’t matter if its a built-in function or a custom one. A function call is a function call after all. It’s the same approach taken by other highlighters in the Kakoune repo.
On the other hand, populating
static-words with the value returned by
(all-bindings) like you did is a handy feature the Janet support in Kakoune current lacks.
In any case, I’m open to discuss any aspect of it. Nothing is set in stone. I’m confident we can arrive to a solution you feel good enough to use by yourselves. And your
janet.kak repo can eventually continue to exist as a complement of the official Janet support, building upon it. That would be the perfect solution.