News

Open Source Atom Code Editor Gets IDE Features

GitHub is morphing its open source code editor, Atom, into more of a full-fledged IDE with a new project appropriately called Atom-IDE.

Just announced this week, Atom-IDE integrates programming language support in order to offer IDE-like features.

"Get smarter context-aware auto-completion, code navigation features such as an outline view, go to definition and find all references," the site says. "As well as hover-to-reveal information, diagnostics (errors and warnings) and document formatting."

To leverage that functionality, a number of language packages -- based on the language server protocol -- have been developed for the project.

"Our initial release includes packages for TypeScript, Flow, JavaScript, Java, C# and PHP that utilize the power of language servers to provide deep syntactical analysis of your code and projects," said GitHub Atom developer Damien Guard in a blog post Tuesday. "The language server protocol is being adopted by a number of organizations including Microsoft, Eclipse, Sourcegraph, Palantir, Red Hat, Facebook and now GitHub too!"

Speaking of Facebook, GitHub worked with Facebook's team of Nuclide developers to provide the project's UI. Ironically, the Nuclide code editor was developed by Facebook to provide more IDE-like features on top of Atom. "However, over time we've heard feedback that the 'one-size-fits-all' philosophy can be overwhelming for many Atom users," Nuclide developer Hanson Wang said in his own introductory blog post. "That's why we're proud to announce the new Atom IDE UI package, which is part of our collaboration with GitHub in the broader Atom IDE initiative."

Using Atom-IDE involves installing packages on top of Atom -- Atom Beta 1.21 is strongly recommended -- to provide the UI and support for whatever programming language is desired.

"Each of the IDE packages expose a selection of functionality that is dependent on the underlying language server and is activated when you open files it supports," Guard said. "(Some take a few seconds to start-up and others like ide-java and ide-php will take a short while on first open to download the language server itself.)"

Atom-IDE
[Click on image for larger view.] Atom-IDE (source: GitHub)

As for the UI, Wang said, "Atom IDE UI is fast and lightweight by design. It extracts only the subset of the core UI features from Nuclide necessary to support Atom's atom-languageclient library in displaying features supported by the language server protocol. Like Nuclide, it's a unified package which contains the following features:

  • Diagnostics
  • Definitions
  • Find References
  • Outline View
  • Datatips
  • Code Formatting
  • Code Actions
  • Code Highlight
  • Busy Signal

The source code for all those features can be found on GitHub

GitHub's Guard said future plans include expanding the number of supported languages, such as Rust, Go, Python and so on.

"If a language server exists for your favorite language it is incredibly easy to create your own Atom-IDE package that takes advantage of it by using our atom-languageclient npm library that provides common automatic wire-up of the major features as well as helper tools such as downloading support files and conversions," Guard said.

Atom IDE UI
[Click on image for larger view.] Atom IDE UI (source: Facebook)

Facebook's Wang also detailed future plans.

"The list of features in Atom IDE UI doesn't yet encompass all the features available in the language service protocol, and over time we'll be working to fill in the gaps," Wang said. Those gaps include:

"Our hope is that other Nuclide features will eventually also become part of the Atom IDE effort, including key components like the Nuclide debugger," Wang said. "Note that we're still committed to supporting the open-source Nuclide package for the foreseeable future."

About the Author

David Ramel is an editor and writer at Converge 360.