onsails / lspkind.nvim

vscode-like pictograms for neovim lsp completion items
MIT License
1.51k stars 39 forks source link

feat: Add `before` function callback for custom format #30

Closed danymat closed 2 years ago

danymat commented 2 years ago

Hello, this allows me to do something like this (just replaced cb with before though)

Capture d’écran 2021-12-01 à 15 21 33

In order to apply custom format:

Capture d’écran 2021-12-01 à 15 23 27
onsails commented 2 years ago

Nice! Could you also put option documentation in README?

danymat commented 2 years ago

Just did that, what do you think ?

onsails commented 2 years ago

thanks!

kuntau commented 2 years ago

@danymat can you show full code please.

What is the types.lsp.insertTextFormat.Snippet?

danymat commented 2 years ago

https://github.com/danymat/dotfiles/blob/d91534d08e5a3f6085f8348ec3c41982e9b74941/nvim/.config/nvim/lua/configs/cmp.lua#L35-L60

jsr-p commented 1 year ago

I made a function similar to @danymat that works with Ultisnips, see here