I'm new to Atom and JavaScript, Atom seems to be pretty good for web developing.
But to my best knowledge, it seems that there is no Atom package for enabling JavaScript autocomplete.
Does anyone know a package doing this or does Atom have a plan to support JavaScript autocomplete?
Since JavaScript is loosely coupled, providing a working autocomplete solution is not as easy as for statically typed languages like Java. Your best bets with Atom are the following packages:
- autocomplete-plus - this is now bundled with Atom as the default autocomplete provider
- ternjs - this looks pretty good, but requires some configuration.
I suggest you give these a try.
I think you should go for atom-ternjs
This is java script intelligence for atom
You need to change(Enable) setting for atom-ternjs
- Use autocomplete-snippets
- Display both autocomplete-snippets and function name
and many more depends on your requirements ...
If you are using es6 JavaScript or TypeScript or Node then ide-typescript is good. It uses language server similar to vscode and understands imported/required modules from your project and npm libraries. Also there is quite similar atom-typescript with more focus on TypeScript but can be also configured for JavaScript as described here - https://github.com/TypeStrong/atom-typescript/blob/master/docs/faq.md#i-want-to-use-atom-typescript-with-javascript-too.
来源:https://stackoverflow.com/questions/30954674/atom-javascript-autocomplete