Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Axel Anceau
@Peekmo
Hello, how to add snippet please ?
Joe Fitzgerald
@joefitzgerald
hi @peekmo - snippets are predominantly housed in language-{language name} repos or packages, but you can also create your own (Atom > Open Your Snippets)
Axel Anceau
@Peekmo
Is there a way to add them programmatically ? I'm developing a provider using autocomplete-plus and I would like to use snippet when a choice is selected
Joe Fitzgerald
@joefitzgerald
i also have a desire to supply snippets as suggestions
in go-plus
i haven’t figured it out yet, but when i do i will notify you - for now perhaps you could add an issue in the autocomplete-plus repo?
to that effect
Axel Anceau
@Peekmo
ok :) thank you for your answer
Trudko
@Trudko

Hi, not sure what am I doing wrong. I have installed autocompelte plus and autocompelte plus snipepts. Then I've added this snippet to my snippets file.
'.source.php':
'App::abort':
'prefix': 'abort'
'body': 'App::abort(${1:404}${2:, \'${3:message}\'});'

Problem is that if I type abort and qucikly press tab right away then snippet works, but if I type normally snippet isn't shown in suggestions neither is expanded after the pressing tab. ignore_user_abort is suggested and expanded instead. Am I missing something?

Luis Martins
@lmartins
Hi, I have both autocomplete-plus and autocomplete-snippets installed but still no snippets show up in the suggestions tooltip. I've also disabled the default autocomplete feature. Am I missing something?
Joe Fitzgerald
@joefitzgerald
it depends on the kind of file you’re editing
and the grammar that is activated
Luis Martins
@lmartins
I have snippets for sass and they don't show up on sass files
but i'll make a few tests considering that
For example, I have https://github.com/zenorocha/atom-javascript-snippets installed but on .js files the snippets don't show up on the tooltip, but more interesting I can't even expand the abbreviations so yeah, you might be on to something.
Alexey Alekhin
@laughedelic

Hi! I have snippets starting from slash and they don't show up in autocomplete (same with any non-alphabetic symbol in the beginning):

'.source':
  '⊗': body: '⊗', prefix: '\\ox'

Typing \ox<tab> inserts the symbol, but I don't get any autocompletion list with just \. I f change the prefix to just ox, it works as expected.