Closed Joaco-1321 closed 2 months ago
It seems that it also happens in Ubuntu, this is a fresh neovim install with only Kickstart
what worked for me :
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts (create folder if it doesn't exist)
3.) Run the command fc-cache -fv to manually rebuild the font cache
4) change this line in init.lua
vim.g.have_nerd_font = true
what worked for me :
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts (create folder if it doesn't exist)
3.) Run the command fc-cache -fv to manually rebuild the font cache
4) change this line in init.lua
vim.g.have_nerd_font = true
Sorry I should clarify, I'm not using a nerd font and dont want to use one, but still renders like I have one
I checked out the whichkey docs; try in your whichkey config opts.icons.mappings = vim.g.have_nerd_font
. I will update #1068 to reference this issue.
thanks @iton0, that solved part of the problem, but there's still some characters that doesn't get rendered.
I'm using Windows Terminal with Cascadia Code as font.
Update the relevent key strings how you would like them to appear.
opts.icon.keys = {
Up = " ",
Down = " ",
Left = " ",
Right = " ",
C = " ",
M = " ",
D = " ",
S = " ",
CR = " ",
Esc = " ",
ScrollWheelDown = " ",
ScrollWheelUp = " ",
NL = " ",
BS = "",
Space = " ",
Tab = " ",
F1 = "",
F2 = "",
F3 = "",
F4 = "",
F5 = "",
F6 = "",
F7 = "",
F8 = "",
F9 = "",
F10 = "",
F11 = "",
F12 = "",
},
again, thanks a lot @iton0, I should've read the docs first. do you know why they changed it? I remember when space was just <space>
. and also, do I have to manually set all of these or is there a way to disable it? I will look the docs just in case but please let me know if you have an answer.
should I close this issue?
also, keep up the good work man, I've seen you in various issues fixing things, your help it's very appreciated 😁
@Joaco-1321 thank you! Keep this issue open for now. From the docs it seems like you have to do this manually but if you find otherwise please put the solution in here.
Additionally, I would ask in the which-key discussion for more info about the icons.
thanks, this is what I've come up with if anyone that sees this issue is interested.
boring but simple.
could you actually put that in a code block?
oh sure, here it is.
require('which-key').setup {
icons = {
mappings = vim.g.have_nerd_font,
keys = {
Up = '<Up> ',
Down = '<Down> ',
Left = '<Left> ',
Right = '<Right> ',
C = '<C-…> ',
M = '<M-…> ',
D = '<D-…> ',
S = '<S-…> ',
CR = '<CR> ',
Esc = '<Esc> ',
ScrollWheelDown = '<ScrollWheelDown> ',
ScrollWheelUp = '<ScrollWheelUp> ',
NL = '<NL> ',
BS = '<BS> ',
Space = '<Space> ',
Tab = '<Tab> ',
F1 = '<F1>',
F2 = '<F2>',
F3 = '<F3>',
F4 = '<F4>',
F5 = '<F5>',
F6 = '<F6>',
F7 = '<F7>',
F8 = '<F8>',
F9 = '<F9>',
F10 = '<F10>',
F11 = '<F11>',
F12 = '<F12>',
},
},
}
Describe the bug
Which-Key showing nerd fonts regardless of the value of
vim.g.have_nerd_font
To Reproduce
Desktop
Neovim Version