Open a-moses opened 9 years ago
have run into this issue too while trying out the snippets for language-laravel. is there any way to fix this? after we type ':' the autocomplete think that we're trying to type a completely new snippets and didn't take into consideration about what was written before the ':' character
Can you please post the full snippet text for a snippet that exhibits this behavior?
of course! it's part of the atom package here https://atom.io/packages/laravel when i try to use the snippet for Route::get snippet, i need to type ro:g for it to work. but if autocomplete-snippets and autocomplete-plus is on, it consider the g as a new autocomplete keyword / search
--edit now that i think about it, doesn't it seems like it is autocomplete-plus bug rather than the autocomplete-snippets bug?
Yes, it is an autocomplete-plus bug. https://github.com/Cronos87/atom-laravel/blob/cebcc3174c5d1d8834eebc674708f270749a0c53/snippets/laravel.cson#L24-L27 seems to capture a test case that we can use.
Your Route::get snippet is here: https://github.com/Cronos87/atom-laravel/blob/cebcc3174c5d1d8834eebc674708f270749a0c53/snippets/laravel.cson#L451-L454. I'll use that.
hi, i've found out the modification needed to allow autocomplete-plus to recognize snippets with colon characters. it's these https://github.com/atom-community/autocomplete-plus/blob/master/lib/autocomplete-manager.coffee#L34-L35
https://github.com/atom-community/autocomplete-plus/blob/master/lib/fuzzy-provider.coffee#L11
should i do a pull request? since this modifies the fuzzy provider which, according to the wiki, is already deprecated
@benogle is it valid for a snippet's groups to be nested like this: Route::input(${1:'${2:name}'})$3
(i.e. group 2 is nested inside of 1). I have replicated a failure in our autocomplete-snippet parsing if the groups are nested. The double ::
doesn't cause any issues.
the sign ' : ' break the autocomplete prosses
for example
Closure Closure::bind