GitHub announced the launch of Atom-IDE – a set of optional packages to bring IDE-like functionality to Atom. It includes smarter context-aware auto-completion as well as a host of code navigation features such as an outline view, go to definition, find all references as well as other useful functions such as hover-to-reveal information, errors and warnings (diagnostics) and document formatting.
Linux Ubuntu users must use Atom Beta 1.21 as it includes the necessary file monitoring and process control to ensure the underlying language servers are running properly. You’ll need to install at least two packages – the user interface for Atom IDE and a package that support the language you wish to use:
- Download Atom Text Editor (Beta)
- Bring up Atom’s Install Packages dialog (Settings View: Install Packages and Themes)
- Search for and install the atom-ide-ui package to bring in the IDE user interface
- Install the IDE language support you need.
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. (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.)
Here’s a quick summary of how these features are exposed within Atom IDE:
Autocomplete is enabled in all the ide packages we are shipping today. Start typing to get improved results. Some providers may require you to manually trigger autocompletion by pressing CtrlSpace for performance reasons.
You can see diagnostics by clicking the red exclamation mark and yellow warning triangle at the bottom left of your Atom window. This will open the new Diagnostics pane that shows you the errors and warnings and allow you to click them to jump right to that location in the code. You will also see indicators to the left of line numbers in the editor itself.
Find all references
Position the text cursor in the class or variable you are interested in then activate Find all references either from the right-mouse button menu or Find References: Activate from the command palette.
Some providers allow you to reformat the document. Simply select Code Format: Format Code from the command palette.
Go to definition
Ctrl click on a class or variable reference to be taken directly to where it is defined within your project.
Hover the mouse pointer over a type or other supported object and you can see some additional information relating to it.
Many providers let you see a tree-based outline view of the current document which you can search and then click to go right to that area of code. You can toggle the new Outline View from the View menu or the Outline View: Toggle command.
Some providers let you see immediate references to the variable or object you are working on. Positioning your text cursor within that variable can highlight other references instantly.