gaalcaras / ncm-R

R autocompletion for Neovim and vim 8 :memo: :bar_chart: :zap:
GNU General Public License v3.0
118 stars 10 forks source link

Can't get UltiSnips working #12

Closed gregrs-uk closed 6 years ago

gregrs-uk commented 6 years ago

I've installed the new version of ncm: ncm2, UltiSnips and ncm2-ultisnips. I have the following in my init.vim:

inoremap <silent> <expr> <CR> ncm2_ultisnips#expand_or("\<CR>", 'n')
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsEditSplit="vertical"

but I'm not seeing any snippet expansion. Is this because of the new version of ncm perhaps?

gregrs-uk commented 6 years ago

I've tried using the old version of ncm, which works okay, but ideally I guess it would be good to be able to use ncm2.

gaalcaras commented 6 years ago

Hi there,

Unfortunately, I had to put ncm-R on the back burner for a while, mainly because I had to switch from R to Python for work, so I rarely used ncm-R myself anymore.

The good news is, I temporarily had to work on a R project last week, and not having R completion with ncm2 was frustrating, so I've been working on updating ncm-R to make it work with ncm2.

I'm keeping it on a feature branch for now. UltiSnips works for me, but you do have to configure it properly to work with ncm2 and ncm-R. Check out this comment to make it work with <Tab>.

Would you mind trying it and telling me if it works for you? If that's the case I'll merge it to the main branch.

gregrs-uk commented 6 years ago

Many thanks @gaalcaras. I may not have time to test it immediately but when I do I'll give it a whirl…

gaalcaras commented 6 years ago

Awesome, keep me posted.

I have now merged the feature branch into master. Since this issue is about an older version of ncm, I'm now closing it. But feel free to open a new issue if you run into problems when setting up snippets.