I’ve been trying to think of the best way to get autocomplete behaviour for a language like Latex.
My first approach was to make snippets for all the common commands, but that doesn’t play well with
autocomplete-snippets, mainly because it doesn’t allow customised prefix characters, so
\ cannot be used in the snippet name (I realise the snippets themselves work, but I’m talking about the popup created by
autocomplete+). The other problem with this approach is that
autocomplete-snippets has hardcoded the scope blacklist for snippets, which means that any math snippets will not appear in the popup menu (because math is scoped to string in
Alternatively, it seems I can make an autocomplete provider directly for
autocomplete+. This will allow all my snippets to appear with arbitrary prefixes and locations, solving the two issues with pure snippets. However, this won’t let the autocompleted commands be available as regular snippets, which could be annoying to some users.
Therefore, I’m not sure if I should make them as snippets and hope the issues are fixed by
autocomplete-snippets, or as an
autocomplete+ provider and not available as regular snippets.