xavierd / clang_complete

Vim plugin that use clang for completing C/C++ code.
http://www.vim.org/scripts/script.php?script_id=3302
1.96k stars 308 forks source link

Snippet support with deoplete #471

Open expipiplus1 opened 8 years ago

expipiplus1 commented 8 years ago

Is it possible at the moment to get snippets working while using deoplete? I've had no luck setting this up and there's nothing mentioned about this combination in the documentation.

ping @DarkDefender too.

DarkDefender commented 8 years ago

If I understand the code correctly then the clang_complete snippets are already working in deoplete. However you can't navigate around the placeholder items.

IE if you complete std::vector you get "std::vector<$typename _Tp>" where you should be able to navigate to the type declaration. However this doesn't work currently and I don't seen any built in deoplete functions to handle this.

expipiplus1 commented 8 years ago

Hmm, perhaps deoplete is interfering with my ability to jump in the snippets.

The code for getting neosnippet working with deoplete is actually quite simple https://github.com/Shougo/neosnippet.vim/blob/master/rplugin/python3/deoplete/sources/neosnippet.py

@Shougo What would it take to get snippet support like neosnippet's for this?

Shougo commented 8 years ago

Hm. g:neocomplete#enable_completed_snippet is similar feature.

DarkDefender commented 8 years ago

@expipiplus1 I got it working with let g:clang_snippets = 1 and then after you have completed the desired code you have go into normal mode and hit tab.

So I guess we can close this now as it works with deoplete