Skip to content

pragdave/base16-emacs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://stable.melpa.org/packages/base16-theme-badge.svg http://melpa.org/packages/base16-theme-badge.svg

Base16 themes for Emacs

Base16 provides carefully chosen syntax highlighting and a default set of sixteen colors suitable for a wide range of applications. Base16 is not a single theme but a set of guidelines with numerous implementations.

This repository contains the Emacs templates and MELPA. It can be built by using one of the builders listed on the main Base16 page.

If you notice anything that looks strange or if this repo is missing any scheme updates, please feel free to open an issue or submit a pull request.

Installation

package.el

base16-theme is available in both MELPA stable and MELPA.

You can install it with the following command:

M-x package-install base16-theme

To load one of the themes on emacs startup, add this to your init file (replacing base16-default-dark with the name of the theme you want):

(load-theme 'base16-default-dark t)

use-package

The use-package block is fairly similar to package.el.

(use-package base16-theme
  :ensure t
  :config
  (load-theme 'base16-default-dark t))

Note that use-package tries to defer packages if at all possible, so you may need to add :demand to the use-package block.

Previews

Theme previews can be found here.

It is recommended to generate screenshots by adding the gh-pages branch as a subtree (git worktree add -B gh-pages gh-pages origin/gh-pages) then using the normal generation tools (simply run screenshot.sh from the screenshots dir).

evil-mode

evil-mode doesn’t provide a way for themes to set the cursor color, so if you’re interested in matching the base16 spaceline indicator, you can use the following snippet:

;; Set the cursor color based on the evil state
(defvar my/base16-colors base16-default-dark-colors)
(setq evil-emacs-state-cursor   `(,(plist-get my/base16-colors :base0D) box)
      evil-insert-state-cursor  `(,(plist-get my/base16-colors :base0D) bar)
      evil-motion-state-cursor  `(,(plist-get my/base16-colors :base0E) box)
      evil-normal-state-cursor  `(,(plist-get my/base16-colors :base0B) box)
      evil-replace-state-cursor `(,(plist-get my/base16-colors :base08) bar)
      evil-visual-state-cursor  `(,(plist-get my/base16-colors :base09) box))

Development

Above, there’s a use-package block listed for general use, but if you want to run these themes out of the git repo, there’s a bit more work which needs to be done. I use something similar to the following use-package block:

(use-package base16-theme
  :ensure nil
  :load-path "site-lisp/base16-theme"
  :init
  (add-to-list 'custom-theme-load-path "~/.emacs.d/site-lisp/base16-theme/build")
  :config
  (load-theme 'base16-default-dark t))

This block assumes the repo is cloned to ~/.emacs.d/site-lisp/base16-theme. That needs to be added to the load path (along with specifying :ensure nil if needed so use-package doesn’t try to grab the package from melpa). Additionally, the build directory needs to be added to the custom-theme-load-path to ensure load-theme can find the themes.

Credits

Current maintainer: belak

Previous maintainers:

About

Base16 themes for Emacs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 99.0%
  • Other 1.0%