Atom 1.36 has shipped! Upgrade today to open single files in large directories much faster, see pull request review comments from GitHub, specify multiple wrap guides at once, and more.
Open a single file without its parent directory
Have you ever wanted to make a quick edit to a single file in your home directory, only to have Atom dutifully process and index all of your files?
When a root directory is added to your open project, we do a bunch of work to understand its contents, watching for relevant filesystem changes and populating the tree view. Previously, when you opened Atom on a single file, we automatically added its containing directory as a root directory. This was good for restoring persisted session state, but had the unfortunate consequence of slowing things to a crawl when that directory was a large one. Now we only open the file you’ve asked us to, which we can do much more quickly.
Happy dotfile editing!
Fuzzy Finder Performance
Once upon a time, there was a noticeable lag between when you opened Atom with a large repository and when you could use the fuzzy finder to actually open files. Thanks to some smart detective work, fuzzy finder performance is now much improved! This release shaves a whopping 40% off the time it takes to index files in medium and large repositories.
Pull request review comments and large diff detection in the GitHub package
The GitHub package allows you to read review comments left on pull requests without leaving the comfort of your editor. Open the “files changed” tab of a pull request detail view to check it out.
We’ve been researching and iterating and refining on this one heavily in the past few months. Peek ahead at the beta release notes below to see where we’ve taken the review experience next
You can also collapse and expand any files within diff views that show diffs from multiple files, such as commit preview and the pull request files view. Large files are collapsed by default, because you probably don’t need to see those 800 lines of
package-lock.json changes in such great detail. (And if you do, just expand them!)
Keyboard shortcuts for finding text now work within the diff view. That’ll make it easier to remove all those forgotten
console.log() statements you were about to commit.
On a related note, if you write a package that embeds a
TextEditor within a custom workspace item, you too can wire it up to integrate with find-and-replace by implementing the
observeEmbeddedTextEditors() methods on your item.
Auto-updater improvements for Windows and macOS
We’ve taken care of some rough edges that had accumulated in our auto-updater logic. On Windows, if the
core.automaticallyUpdate setting was set to
false, Atom would incorrectly tell you that you couldn’t manually upgrade from the “About” pane. Meanwhile, on macOS, clicking “restart and install update” would close Atom but not properly re-launch as the new version. Both of these have been fixed.
Multiple wrap guides
Hat tip to @lexicalunit for this one: you may now configure multiple wrap guide columns. This can be useful if you want to give yourself a “soft limit” to let yourself know you should be wrapping up that line soon.
To turn it on, edit your
config.cson file to include the array of guide columns:
'wrap-guide': 'columns': [72, 80, 100, 120]
Language package improvements
We have a host of improvements to bundled language packages in this release:
@cuberoot added JSX support to
- Thanks to @Ingramz,
language-htmlwill correctly use the “GraphQL” grammar for embedded GraphQL in script tags. Note that you’ll need to install the community GraphQL package to syntax-highlight properly.
sqlsub-grammars within template literals that use the appropriate tags.
- Finally, the tree-sitter grammar on
language-rubyhas improved the way it highlights certain float and integer literals.
Isolated Atom environment for Jasmine tests
Package authors take note! Previously, if your package used the default Jasmine test runner, the Atom environment used by your tests would activate any packages that you happened to have installed locally. This could cause your tests to unexpectedly fail if there were any problems with your other packages, or, worse, to silently depend on something that was changed by a different package. We now further isolate the Atom environment to keep things nice and reproducible.
If your tests do depend on another package being activated, set the
APM_TEST_PACKAGES environment variable to a space-separated list of package names and they will be available to your tests. Conveniently, this is the same way that atom/ci allows you to specify package dependencies.
Don’t forget to check out all the other improvements shipping with Atom 1.36 in the release notes!
Atom 1.37 Beta
Atom 1.37 beta introduces a complete flow for handling review comments you’ve received on a pull request.
Pull request review comments in the GitHub package
Responding to review comments that a reviewer has left on a pull request you’ve submitted can be cumbersome. You need to cross-reference lines back and forth between GitHub and your editor, using the diff context and line numbers to find the place where the comment was made.
Now, to reduce the amount of mental context switching you need to do, we show reviews and review comments right in your favorite editor To open the all-new reviews tab, click on the “see reviews” button in the GitHub tab while you’re on a branch associated with a pull request, or click “see reviews” in the footer of a pull request detail view.
With the reviews tab open, expand any review comment thread to read how awesome your code is. Click “Jump To File” to open or focus an editor and scroll to that line, or click “open diff” to scroll to the commented line on the diff in the pull request detail view. We’ll automatically account for any changes you’ve made locally but haven’t pushed yet.
While you’re in an editor, any lines that have been commented on are highlighted. Click on the comment icon in the left gutter to jump back to that comment in the review tab.
Beneath the comment thread in the reviews tab, you can respond to the thread directly with the provided text box to keep the conversation going, or react with a reaction emoji. When you’re satisfied that you’ve addressed the feedback from a specific comment thread, click “Resolve conversation” to mark the thread as resolved. To help you keep track of your progress through review feedback, resolved comment threads will be greyed out and counted in a progress bar at the top of the tab.
Get the bar green, get those green checks, and get your code shipped!
Dramatic fuzzy-finder performance boost
The fuzzy finder’s project crawling performance has been improved dramatically by switching to a ripgrep-powered backend. This is most noticeable in projects with large numbers of files - for example, we measured a 14x speed boost in a project with 270K files.
The ripgrep-powered search returns somewhat different results, so we’ve placed it behind a configuration option for now while we work out any unexpected kinks in the transition. To turn it on, open the fuzzy-finder package settings in your Settings view and enable the “Use Rip Grep” option.
Authenticate and encrypt communications over Atom’s activation socket
While it’s launching, Atom uses a UNIX domain socket (on macOS and Linux) or a named pipe (on Windows) to determine if an existing main process is hanging around to open a window for you before starting a new one. Now, all communication that occurs through that channel is authenticated and encrypted to keep other people with access to your machine from reading or interfering with those messages.
As a related change, the
--socket-path command-line argument has been removed, although it doesn’t look like it was used outside of internal testing.
Language package improvements
The bundled language packages have another set of goodies in the pipeline in beta as well:
language-clojurecan handle non-ASCII characters in keywords, symbols, and identifiers, like the clojure compiler itself, thanks to @PEZ.
@caleb513 made the
language-pythontree-sitter grammar able to recognize shebang lines that reference “python2” or “python3” instead of just “python”.
language-tomlnow correctly tokenizes multiple key/value pairs on a single line, again thanks to @caleb513
language-rubyrecognizes “next” as a keyword thanks to @willcosgrove.
There are many more details in the release notes.
Get all these improvements today by joining the Atom Beta Channel!