Reproducible Atom Setups with config.cson and apm — and Why You Should Plan an Exit
Keep an existing Atom setup reproducible with versioned config.cson, scoped per-language settings, and an apm packages file — while planning your exit from a discontinued editor.
22 Nov 2025, 12:42 UTC

If you still run Atom on a machine you maintain, the useful answer is this: your entire editor setup — settings, per-language indentation, keybindings, and package list — can live in three version-controlled files (config.cson, init.coffee, and a packages.txt), and a fresh machine can be rebuilt from them in minutes. The catch is equally important: GitHub sunset Atom in December 2022 and archived the repositories, so this is a strategy for keeping an existing environment reproducible while you migrate, not a reason to adopt Atom for anything new.
How Atom's configuration actually works
Atom loads settings in layers: built-in defaults first, then your ~/.atom/config.cson merged on top. CSON is CoffeeScript Object Notation — like JSON but indentation-based, with no commas or braces required. Because the file is plain text and deterministic, it diffs cleanly in Git, which is what makes it worth versioning.
The key mechanism is scoping. Settings under the "*" key apply everywhere; settings under a scope selector like .source.python apply only when the cursor is in a buffer using that grammar. This is how you get 4-space indentation globally but 2 spaces in JavaScript from a single file.
A worked config.cson
Edit ~/.atom/config.cson directly (or via Settings > Open Config Folder). Atom watches the file and reloads on save — no restart needed.
"*":
core:
telemetryConsent: "no"
editor:
tabLength: 4
softTabs: true
showInvisibles: true
"whitespace":
removeTrailingWhitespace: true
".source.js":
editor:
tabLength: 2
".source.python":
editor:
tabLength: 4
preferredLineLength: 88
Two things to note. First, package settings (like whitespace above) live in the same file under the package name, so third-party behavior is captured too. Second, the scope selector must match the grammar's scope name exactly — .source.javascript instead of .source.js would silently do nothing. You can find the actual scope for an open file with the Editor: Log Cursor Scope command.
Reproducing the package set
Settings alone don't reproduce an environment; packages do the rest. Atom ships with apm, its package manager, which supports a packages file:
# On the working machine, capture installed packages with versions:
apm list --installed --bare > ~/.atom/packages.txt
# On a fresh machine, restore the same set:
apm install --packages-file ~/.atom/packages.txt
Run these in a terminal; no special permissions are needed since everything lives under your home directory. The --bare flag prints name@version lines, which pins versions — important because abandoned packages can change or disappear, and pinning at least makes the failure reproducible rather than surprising. Verify the restore by diffing apm list --installed --bare output on both machines.
Small customizations without writing a package
The init script (~/.atom/init.coffee, or init.js in later versions) runs at startup and has full access to Atom's API. It's the right place for one-off commands that don't justify a package:
# init.coffee — add a command that inserts an ISO date
atom.commands.add 'atom-text-editor', 'custom:insert-date', ->
editor = atom.workspace.getActiveTextEditor()
editor?.insertText(new Date().toISOString().slice(0, 10))
Bind it in keymap.cson and the customization is also versioned. Keep init scripts small; anything stateful or complex belongs in a package, and anything critical belongs in an editor that's still maintained.
Verification checklist
- After editing
config.cson, open files of two different grammars and confirm the status bar shows the expected indentation for each. - If an override seems ignored, check the scope name with Editor: Log Cursor Scope before assuming the file is broken.
- After restoring on a new machine, run
apm list --installedand compare against the source machine. - CSON is indentation-sensitive; a malformed file can silently drop settings. If a setting stops applying, re-check indentation first.
Limits and the discontinuation problem
Atom's repositories are archived. There are no security fixes, Tree-sitter grammars and language-server integrations are frozen at their 2022 state, and the package registry's long-term availability isn't guaranteed — apm install could stop working entirely. Third-party packages are unmaintained too, so pinning versions avoids surprises but doesn't fix abandoned dependencies.
Practical guidance: treat any installed Atom copy as unmaintained software. Don't install it on new machines, don't use it on sensitive codebases without accepting the risk, and use the reproducibility setup above as a bridge — it keeps your current environment consistent while you move to a maintained editor. Before relying on any of this, confirm the sunset status on the archived atom/atom repository README, since registry behavior may have changed since this was written.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.