banga / git-split-diffs

Syntax highlighted side-by-side diffs in your terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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

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.