Atom auto complete is a bit stupid


I installed the language-rust packages. I am not too sure what package deals with autocomplete and shit but it seems a bit stupid; as soon as I type fn m I get a bunch of suggestions such as main() to be autocompleted which is fine. But when I click on the suggestion, then I get this

fn fn main() {

Like why am I getting fn fn twice, why can’t it be a bit smarter to know that I already typed fn.

Are there any better packages I can install?


You should figure out which package is doing the autocomplete. Then we can give you specific advice.


Does this package “language-rust” handle the autocomplete?


The package has no code, just grammar, styles, settings, and snippets.


Uploading… Are one of these packages responsible for autocomplete?

    'prefix': 'main'
    'body': '''
      fn main() {

fn is part of the snippet definition for main; it’s duplicating because you typed it yourself as well. Just type main, or define your own snippets.


Well the thing is that it could be a little smarter to know what you have typed out and it does not re type the same thing, for example if I typed fn then if it suggestes to auto complete the whole thing. Even Microsoft Visual Studio (not visual studio code) is smarter than this.


That’s not about smartness. It’s how the snippet is defined.

And what you want is possible, it just takes some knowledge of JS and the autocomplete API.