ncm2 / ncm2-ultisnips

44 stars 3 forks source link

Fix snips of member functions by switching snip option from 'i' to 'w' #14

Closed daquexian closed 5 years ago

daquexian commented 5 years ago

https://github.com/ncm2/ncm2-ultisnips/blob/15432d7933cfb855599442a67d6f39ddb706c737/autoload/ncm2_ultisnips.vim#L45

Here passes the option i to ultisnips. From the doc it requires the trigger text is at the beginning of the line or is preceded by whitespaces, so member functions, e.g. vector.push_back(...), cannot be completed, since the completed item only contains push_back(...) and it doesn't meet the requirement of option i.

Also, there are two is in this line, the first i should be the description, which is unused at this point from UltiSnips' doc. Two is are confusing and unnecessary, so I replaced the first i with ""

roxma commented 5 years ago

I don't understand, what's the issue?

peek 2018-11-20 13-06

daquexian commented 5 years ago

Sorry I did something wrong and misread the document :)