onivim/oni

Snippets: Create UltiSnips snippet provider

Open

#1.735 geöffnet am 7. März 2018

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (336 Forks)batch import
enhancementhelp wantedinsider

Repository-Metriken

Stars
 (11.389 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

For snippets, it'd be helpful and convenient to automatically import users UltiSnips snippets. We'd need to parse and convert them into our snippet format, and then implement a SnippetProvider for them. UltiSnips is extremely popular and having integration out-of-the-box would be awesome.

Some info on the API here: https://github.com/onivim/oni-api/blob/90bc638bc598f7ba0175abb68f5313a9da1280df/src/index.ts#L66

We have a snippet provider that loads user-defined snippets here: https://github.com/onivim/oni/blob/7ad938cbcfe8b25acd2d358e3e3cb94f4a00953c/browser/src/Services/Snippets/UserSnippetProvider.ts#L37

This would be a good example to follow - the trickiest part will be in implementing the parsing / conversion logic to go from the UltiSnips.

Contributor Guide