Description #
One day I encountered an issue while using Neovim in Kitty terminal. When I pressed newline (return key), neovim always outputted two newlines at the same time. Same thing happened with backspace and various other keys. There was no clear reason why this would be happening. Problem didn’t occur with all terminals, rxvt worked like a champ as it always does. Vi didn’t seemed to be impacted this problem either.
Problem solving #
After few hours of troubleshooting, I couldn’t figure out what was causing this issue but culprits have been found. It seemed that kitty was doing something wrong, since neovim worked ok when used with other terminal emulators.
Fix #
So, I had default Ubuntu 24.04 LTS version of Kitty installed on my laptop. This needed to be updated but unfortunatelly there was no update package available. So I had to install new version from the source.
I downloaded the source files
git clone https://github.com/kovidgoyal/kitty.git && cd kitty
Before kitty can be compiled, we need few dependencies which I didn’t had installed.
sudo apt install libxxhash-dev libharfbuzz-dev liblcms2-dev
libcairo2-dev libmkl-avx2-dev libsimde-dev libsphinx-dev
sphinx-build sphinx-common
Then compilation and creation of linux-package. And did a trial run with dev.sh tool
./dev.sh build
make linux-package
And just like that, compile and install went though. I launched kitty, opened neovim and voila, everything worked as expected. Kitty is linked to /usr/local/bin, so if you don’t have that in your $PATH, you need to type full prefix to your command.
Hope you enjoyed this post and I’ll see you in the next one.
Cheers'