bat icon indicating copy to clipboard operation
bat copied to clipboard

Raku syntax

Open grizzlysmit opened this issue 4 years ago • 2 comments

Yep I'd like Raku syntax highlighting, but not only can I not find it I cannot fined how to add it is there a file I need to build for this ?? I hope I don't have to program rust to do it.

grizzlysmit avatar Feb 25 '21 11:02 grizzlysmit

Please check out the documentation: https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions

sharkdp avatar Feb 25 '21 11:02 sharkdp

From what I've seen, other tools use Perl6 grammars to highlight Raku code. https://github.com/shikijs/shiki/blob/main/scripts/grammarSources.ts#L41 https://github.com/Raku/atom-language-perl6/blob/master/grammars/raku.regexp.cson

bat comes with Perl syntax highlighting - does that fit your needs? If not, maybe you'll want to experiment with converting that cson file linked above to an XML tmLanguage file

keith-hall avatar Jan 29 '22 21:01 keith-hall