onsails / lspkind.nvim

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

Allow `maxwidth` to be a dynamic function #73

Closed mehalter closed 10 months ago

mehalter commented 11 months ago

Allows maxwidth to be dynamic such as calculating a percentage of the width of the editor.

Let me know if this is a change you like. I also know it's possible to just hack this together using the before function, but it's also nice to get built in support with the ellipsis_char and not having to duplicate truncation code.

onsails commented 10 months ago

Great idea, thank you!