Syntax highlighting doesn't work in diff kitten #4112
ROFLailXGOD
started this conversation in
General
Replies: 3 comments 4 replies
-
Putting it in PATH does not work. It needs to be in PYTHONPATH. I
suggest you use the official kitty binary builds, they come with
pygmentize bundled. https://sw.kovidgoyal.net/kitty/binary/
…On Mon, Oct 11, 2021 at 04:42:11AM -0700, Vofel wrote:
I've recently installed kitty and decided to try the diff kitten. The documentation says that `for syntax highlighting to work, pygments must be installed`, so I did that. I use pyenv for managing python installations, so it is located here:
```bash
➜ ~ which python
/home/vofel/.pyenv/shims/python
```
Of course, it is in the PATH. As for the version, I use the latest stable one which is 3.10.0. Pygments is installed:
```bash
➜ ~ pip list | grep Pygments
Pygments 2.10.0
```
So with this configuration I expect syntax highlighting to work, but it doesn't. Tried on 2 `.py` files. Using `pygmentize file.py` directly from the command line works. So I'm not sure if the problem is on my side or if it is an actual bug, so I figured I'll ask here first.
Here's the debug output:
```
kitty 0.23.1 (cd7b4fc) created by Kovid Goyal
Linux VofelPC 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64
Ubuntu 20.04.3 LTS \n \l
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
Running under:X11
Loaded config files:
/home/vofel/.config/kitty/kitty.conf
Config options different from defaults:
enable_audio_bell False
font_family Fira Code Medium
font_features:
{'FiraCode-Medium': ('+zero', '+onum')}
tab_activity_symbol ►
tab_bar_edge 1
tab_bar_style powerline
tab_fade (0.2, 0.4, 0.6, 0.8, 1.0)
tab_powerline_style slanted
Added shortcuts:
shift+super+w KeyAction('close_os_window')
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#4112
--
_____________________________________
Dr. Kovid Goyal
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________
|
Beta Was this translation helpful? Give feedback.
1 reply
-
On Mon, Oct 11, 2021 at 06:05:37AM -0700, Vofel wrote:
I actually installed kitty that way (Binary install section). I was mislead by this line `note that pygments is included in the macOS kitty app` on the kitty-diff page, because to me it sounds like I had to install pygments manually on Linux. Either way, I still can't manage to make it work. What exactly do I need to set PYTHONPATH to?
If you are using the binary you dont need to do anything it willl work
out of the box. Just make sure you have only a single kitty executable
on your system that points to the installed official binary.
You can test it with
kitty +runpy 'import pygments; print(pygments)'
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Looks like a bug, it will be fixed in the next kitty binary release.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've recently installed kitty and decided to try the diff kitten. The documentation says that
for syntax highlighting to work, pygments must be installed
, so I did that. I use pyenv for managing python installations, so it is located here:➜ ~ which python /home/vofel/.pyenv/shims/python
Of course, it is in the PATH. As for the version, I use the latest stable one which is 3.10.0. Pygments is installed:
So with this configuration I expect syntax highlighting to work, but it doesn't. Tried on 2
.py
files. Usingpygmentize file.py
directly from the command line works. So I'm not sure if the problem is on my side or if it is an actual bug, so I figured I'll ask here first.Here's the debug output:
Beta Was this translation helpful? Give feedback.
All reactions