Atom JavaScript Autocomplete

72.6k views Asked by At

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?

5

There are 5 answers

3
nwinkler On BEST ANSWER

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.

0
Mahmoud El-Jiddawi On
  1. install "autocomplete-plus"
  2. install "atom-ternjs"
  3. create or open any js file in your project
  4. click on Packages -> Atom Ternjs -> Configure Project
  5. below libs enable the item "browser"
  6. scroll down and click on “Save and Restart Server”
0
albert200000 On

If you are using modern JavaScript or TypeScript or Node then atom-typescript is good. It uses tsserver (like vscode) which gives autocomplete, go to definition, syntax checking and other ide goodies. By default it's not enabled for JavaScript. Follow the docs to enable for .js files - https://github.com/TypeStrong/atom-typescript/blob/master/docs/faq.md#i-want-to-use-atom-typescript-with-javascript-too. Configuration for tsserver is done by .jsconfig file - https://code.visualstudio.com/docs/languages/jsconfig.

0
nayan verma On

I think you should go for atom-ternjs

This is java script intelligence for atom

You need to change(Enable) setting for atom-ternjs

  1. Use autocomplete-snippets
  2. Display both autocomplete-snippets and function name

and many more depends on your requirements ...

0
Bayram Binbir On

Recommended Atom Packages

  1. atom-ternjs: Adds code intelligence to Atom. https://atom.io/packages/atom-ternjs
  2. autoclose-html-plus: Will help you automatically close HTML tags. https://atom.io/packages/autoclose-html-plus
  3. emmet: Adds code expansion to Atom. https://atom.io/packages/emmet
  4. csslint: Adds CSS error checking abilities to Atom. https://atom.io/packages/csslint
  5. pigments: Adds the ability to display colour in Atom code files. https://atom.io/packages/pigments
  6. language-ejs: Adds EJS language support to Atom. https://atom.io/packages/language-ejs
  7. atom-beautify: Helps to automatically format your code in Atom.