Adding suggestions to ATOM


Hello! I’m new to ATOM and a newbie in JavaScript, and I was wondering if I can add suggestions to comments, doing something like this:

But in comments. That meaning if I type something like “// P” it suggests “Pastilhas” in the same way it suggests on the image.

Thanks in advance!


Heres’s a paint edited file with what I pretend to do:

Thanks again!


Welcome to the Atom community!

What you’re looking for is called an “autocomplete provider” because it provides suggestions for the autocomplete system. We have documentation on how to build a provider and you can find examples to base yours from in the community packages. Additionally, I made a really simple provider to teach myself how to build one that you can use as a template too.


Thanks! It is very helpful! :smiley:


@leedohm just one more thing: in order to test what I’ve done I have to load it into a different project or can I test it on the same package that the provider is?


It depends on the grammar of your provider. If your package is written in JavaScript and your provider provides suggestions for .source.js, it should work.