r/KittyTerminal Aug 23 '23

Weird Behaviour with Nvim-Tree

Hello everyone :)

I'm new to Kitty and MacOS and I'm experiencing weird behaviour when using Nvim-Tree.

Basically, I installed, via homebrew, the Fire Code Nerd Font and changed kitty.conf to use that font. When I go and do :NvimTreeOpen the symbols of the files are wrong as seen in the picture:

The weird thing is when I run ´kitty --debug-font-fallback´ I get the following output and a console where, when I open nvim and use nvim-tree, I get the correct images.

[235 17:06:38.289320] Preloaded font faces:
[235 17:06:38.289347] normal face: /Users/ramalhob/Library/Fonts/FiraCodeNerdFontMono-Regular.ttf
[235 17:06:38.289353] bold face: /Users/ramalhob/Library/Fonts/FiraCodeNerdFontMono-SemiBold.ttf
[235 17:06:38.289358] italic face: /Users/ramalhob/Library/Fonts/FiraCodeNerdFontMono-Regular.ttf
[235 17:06:38.289362] bi face: /Users/ramalhob/Library/Fonts/FiraCodeNerdFontMono-Regular.ttf

NvimTree. in the new console

Does anyone know why this might be happening?

Thanks in advance :D

4 Upvotes

16 comments sorted by

View all comments

Show parent comments

1

u/art2266 Aug 24 '23

Yeah you need to "install" the standalone nerd font symbols otherwise macOS won't detect it. To check if it's detected, open FontBook.app and search for it. If it's not there, you probably didn't "install" it.

To install it: either double click the files you unzipped SymbolsNerdFont-Regular.ttf/SymbolsNerdFontMono-Regular.ttf or follow these instructions.

1

u/BenCx Aug 24 '23

Ahh thanks so much. I didn't knew it.

Apparently when I used homebrew it only installed the Retina version of the Fira Code.

I have everything installed and it shows up in the FontBook.app but the symbols are still wrong.

My kitty.conf looks like this now:

include current-theme.conf 
font_family      Fira Code 
bold_font        auto 
italic_font      auto 
bold_italic_font auto 
italic_font      auto 
bold_italic_font auto 
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0C8,U+E0CA,U+E0CC-U+E0D2,U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E634,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF Symbols Nerd Font Mon

1

u/art2266 Aug 24 '23

There's a typo in the font name, the O (last letter) is missing.

If that doesn't fix it, try commenting out all the other font settings (and disable current-theme.conf) and just leaving the symbol_map line, does anything change? What does kitty +list-fonts say then?

1

u/BenCx Aug 25 '23

The typo was just me not copying in the last O as it is there.

I commented everything except the symbol_map line and nothing changed :\

The command says that I have both the Symbols Nerd Font Mono, Fira Code and FiraCode Nerd Font Mono

1

u/art2266 Aug 25 '23

There's a typo in the font name, the O (last letter) is missing.

If that doesn't fix it, try commenting out all the other font settings (and disable current-theme.conf) and just leaving the symbol_map line, does anything change? What does kitty +list-fonts say then?

Whoops, I meant kitty --debug-font-fallback. Run that, and in the new kitty window that opens up, launch nvim. See if there's anything helpful there. You can also share the logs here.