syntax highlighting not working
carmen-gh opened this issue · comments
Hi, thanks for this awesome tool.
I use it everyday in lazygit.
I wonder how the syntax highlighting is working.
My kotlin code is not highlighted and I wonder if there is a fix a can do on my machine or if it needs to be supported by the tool.
https://github.com/shikijs/shiki/blob/v0.9.3/docs/languages.md#literal-values
kotlin is listed as supported language in shiki
Hey, glad you like it! This is happening because I use the file extension as the language name passed to shiki, which usually works because shiki has aliases from file extensions to languages (e.g. 'rs'
for rust
), but it doesn't for Kotlin.
A PR like shikijs/shiki#353 adding aliases: ['kt']
for kotlin should resolve this issue if you feel comfortable doing that. If not, I can take a stab at it.
Thanks, yes I will definitely take the opportunity and create a PR
@banga It got merged into https://github.com/shikijs/shiki/releases/tag/v0.14.5
Great! I just bumped the shiki version to pick this up and checked that kotlin files highlight correctly now. I released v0.17.0, which you should be able to update to via npm i -g git-split-diffs
.