nvim-completion-manager icon indicating copy to clipboard operation
nvim-completion-manager copied to clipboard

vim-devicons support

Open xerron opened this issue 7 years ago • 6 comments

https://github.com/ryanoasis/vim-devicons https://github.com/ryanoasis/nerd-fonts

seleccion_008

How can I implement these icons in the popup ?, can it? Please give me some advice.

xerron avatar Jan 26 '18 18:01 xerron

i have a ulgry solution:

--- a/autoload/cm.vim
+++ b/autoload/cm.vim
@@ -112,6 +112,10 @@ endfunc

 func! cm#register_source(info)

+    if exists('*WebDevIconsGetFileTypeSymbol')  " support for vim-devicons
+        let a:info['abbreviation'] = get(g:deviconsDict,a:info['abbreviation'],a:info['abbreviation'])
+    endif
+
     let l:name = a:info['name']

     " if registered before, ignore this call

and then add this to your init.vim

let g:deviconsDict = { "Snip":"",
                        \ "path":"",
                        \ "Tag":"" 
                        \ }

But it only support the source that set abbreviation. As you can see, it is static.


i think we cant add kind to the return of completefunc

the completefunc of ncm is

func! cm#_core_complete(context, startcol, matches, not_changed, snippets)

MaiLunJiye avatar Feb 23 '18 04:02 MaiLunJiye

I think it would be very good to have this feature. Hoping that it is not a very big hit in performance.

I have not even started working on it yet. But I hope to achieve it.

xerron avatar Feb 23 '18 17:02 xerron

I have not even started working on it yet. But I hope to achieve it.

i have, and need some beautiful nerd fonts . would you might give me some advices?

Fork : https://github.com/MaiLunJiye/nvim-completion-manager

MaiLunJiye avatar Feb 24 '18 04:02 MaiLunJiye

@MaiLunJiye screenshoots please.

xerron avatar Feb 24 '18 04:02 xerron

screenshot_20180224_130120

i will release it if it support all builtin sources

btw, i need some beautiful nerd font as the icons of class, value, function ....

MaiLunJiye avatar Feb 24 '18 05:02 MaiLunJiye

frist version release

Fork: https://github.com/MaiLunJiye/nvim-completion-manager

issues is wellcome

MaiLunJiye avatar Feb 24 '18 07:02 MaiLunJiye