liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags
https://liuchengxu.github.io/vista.vim
MIT License
1.88k stars 89 forks source link

Option to show or hide the textual description of the symbol kind in lsp renderer #408

Closed emarbo closed 2 years ago

emarbo commented 3 years ago

Hi! Thank you for this great plugin :clap:

I have recently enabled the icons (g:vista#renderer#enable_icon) and configured them properly to work with my font but now I see the kind information duplicated by the icon and the textual description:

x

It would be great to disable the textual description as it's more verbose and redundant. If I'm right, there's no option yet for doing so.

I think the best solution is to add a new flag g:vista#renderer#enable_kind that defaults to 1 for backwards compatibility. As far as I know, modifying this function should do the trick for the CoC:

https://github.com/liuchengxu/vista.vim/blob/cb908f21c23d9c9ebce678c8dbc7a0f876384b8c/autoload/vista/renderer/hir/lsp.vim#L7-L12

And these lines for the ctags:

https://github.com/liuchengxu/vista.vim/blob/cb908f21c23d9c9ebce678c8dbc7a0f876384b8c/autoload/vista/renderer/hir/ctags.vim#L20-L36

If you think this flag worths it, let me know and I can prepare a PR in the next days.

liuchengxu commented 3 years ago

Please go ahead, it's ok with me.