onsails/lspkind.nvim

Codicons used in screenshot

adsnaider opened this issue · 1 comments

Was wondering if it would be possible to have a list of the codicons you have in the README's screenshot alongside with the font necessary for them.

Not repo author, but there are three steps:-

  1. Download codicon from here and install it.
    • If on linux, check font name using fc-list | grep -i codicon. It would be codicon (notice it is not plural).
  2. Setup lspkind
lua require('lspkind').init({ preset = 'codicons' })

If you are using nvim-cmp, an additional step is needed. Add this to cmp.setup

  formatting = {
    format = require'lspkind'.cmp_format({
      mode = 'symbol',
      maxwidth = 50,
    })
  }
  1. Now the hard part — your terminal emulator must be able to use codicon symbols as a fallback or it should give you an option to override few unicode chars with other font. Here's what it looks like for kitty term:

https://github.com/ajitid/dotfiles/blob/2fb58488b07789b846a530c7edc79754bcea3fc2/kitty/.config/kitty/kitty.conf#L69

Once you make these changes, reopen your terminal, open nvim and then try checking if it works.