hrsh7th/nvim-compe

Custom labels for completion types

luiz00martins opened this issue · 2 comments

Is your feature request related to a problem? Please describe.

Currently, the full name of the type of completion is displayed.

Describe the solution you'd like

It would be nice if, similar to coc.nvim, there was an easy way to customize the labels used for various kinds of items in completion results. The most common use case of this is probably wanting to use icons rather than names for the labels.

Describe alternatives you've considered

Currently, there doesn't seem to be any.

Additional context

Other completion mechanisms have this feature, like the mentioned coc.nvim, and completion-nvim (see this issue). However, one problem that I found in completion-nvim's implementation was that it only worked for the LSP. As an example, I had completion-tabnine installed, and it's signature was "tabnine", and it seems like there's no way to change it.

Perhaps a further improvement that can be made is to add the option to change the label for other sources as well. The plugin compe-tabnine currently displays [TN], while the LSP displays <some_type> [LSP]. It'd be nice if these could be freely changed.

+1 It would be also great to configure or disable LuaSnip snippets' language name, as it takes too much space.

Something like this (based on filetype):

source.luasnip.kind = {
    javascript = 'js',
    python = 'py',
    javascriptreact = '',
    html = ''
}
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.