This is a port of the Atom One Dark theme from Atom, which was sunset in December 2022. The original One Dark theme for Atom can be found here:
The theme covers a wide range of built-in and third-party modes. If a mode you use is still missing, pull requests are extremely welcomed! :)
Make sure you have enabled the MELPA package archive in your Emacs configuration.
m-x package-install RET atom-one-dark-theme
If you install packages declaratively, use-package handles both the
install and the load:
(use-package atom-one-dark-theme
:ensure t
:config
(load-theme 'atom-one-dark t))First, clone this repo:
$ git clone https://github.com/jonathanchu/atom-one-dark-theme.gitThen, add this to your Emacs config:
(add-to-list 'custom-theme-load-path "~/.emacs.d/path/to/atom-one-dark-theme/")Load the theme with:
load-theme atom-one-dark
To load this theme on Emacs startup and make it the default, add this to your Emacs config:
(load-theme 'atom-one-dark t)Beyond the core font-lock faces — including the newer ones used by the tree-sitter major modes — the theme styles roughly 76 packages and built-in modes.
Full list
ace-jumpace-windowansi-colorcalendarcentaur-tabscidercompany-modecompilationcounselcustomdesktop-entrydictionarydiff-hldired-asyncdired-modedoom-modelineediffelfeedelixirepaerceshellewwfill-column-indicatorflx-idoflycheckflymakeflyspell- font-latex (AUCTeX)
git-commitgit-guttergomokugudguixhelmhlinumidoisearchivyjabberjs2-modeline-numberlinumlispylispyvillemagitmanmessagemode-linenotmuchnxmlorg-modeperspectivepowerlinerainbow-delimitersrbenvrealgudregexp-builderrmsboltrpm-spec-moderuler-modesh-modeshow-parenslysmartparenssolaire-modespacelineswipertab-bar-modetab-line-modetabbartetrisundo-treeweb-modewindow-dividerwoman
A few modes (notably html-mode and js2-mode) do not define faces of
their own and instead reuse the standard font-lock faces, which makes
them impossible to theme without affecting every other mode. To work
around this, the theme remaps a small number of faces buffer-locally
based on the major mode:
| Mode | Remapped faces |
|---|---|
js2-mode |
font-lock-constant-face, font-lock-doc-face, font-lock-variable-name-face |
html-mode |
font-lock-function-name-face, font-lock-variable-name-face |
Modes derived from these are remapped as well, so mhtml-mode (the
default major mode for HTML files) and js2-jsx-mode are covered too.
If you would rather see the same faces in every mode, disable it:
(setq atom-one-dark-theme-force-faces-for-mode nil)The theme ships two palettes and picks one per display. Terminals that
report exactly 256 colors get color-NNN values chosen to sit closest
to the intended shades; graphical frames and 24-bit terminals get the
real hex values.
If Emacs looks noticeably worse in your terminal than in the GUI, your
terminal is probably not advertising 256 colors. Add this to your
.bashrc or .zshrc, then start Emacs again:
export TERM=xterm-256colorFor fish, the equivalent in config.fish is:
set -x TERM xterm-256colorUnder a daemon the theme is loaded before any display exists, so it
rebuilds the palette against the first client frame and re-applies
itself. Starting emacsclient in a terminal after emacs --daemon
gives you the terminal palette rather than the graphical one.
Bug reports and pull requests are welcome on the issue tracker.
The theme is a single file, atom-one-dark-theme.el. Faces are grouped
by the package they belong to, in one custom-theme-set-faces form, and
each face draws its colors from the palette rather than hard-coding hex
values. Adding support for a mode usually means appending one more
group in the same style.
This theme is the work of many people. See AUTHORS for the full list, and thank you to everyone who has sent a patch.
Distributed under the terms of the GNU General Public License, either version 3 or (at your option) any later version. See LICENSE for the full text.