5

I have a local theme, firebelly, that I wish to use in my local Spacemacs config.

I've tried putting this into a custom layer.

~/.spacemacs.d/layers
├── firebelly
│   ├── local
│   │   └── firebelly
│   │       ├── firebelly-theme.el
│   │       ├── readme.md
│   │       └── screenshot.png
│   └── packages.el

With a simple configuration.

;; I have to manually do this to make colors work
(load "~/.spacemacs.d/layers/firebelly/local/firebelly/firebelly-theme")

(defconst firebelly-packages
  '((firebelly :location local)))

But Spacemacs still yields this error:

An error occurred while applying the theme "firebelly", fallback on theme "spacemacs-dark". Error was: (error Package ‘firebelly-theme-’ is unavailable)

Of course I've tried these avenues, all to no avail.

Nutritioustim
  • 195
  • 1
  • 13

2 Answers2

7

There are various ways to go about this and am not sure of which is the best/official approach; however, here is one option for simply loading a local theme:

First, create a private themes directory, and then save firebelly-theme.el there:

$ mkdir ~/.emacs.d/private/themes

Next, add that directory as a custom theme path in your dotspacemacs/user-init function:

(defun dotspacemacs/user-init ()
  (add-to-list 'custom-theme-load-path "~/.emacs.d/private/themes/"))

Now you may simply add firebelly to the list of available themes:

dotspacemacs-themes '(firebelly)
J.C. Yamokoski
  • 476
  • 5
  • 6
0

This has actually been discussed longly here:

No easy way to use custom themes #7373

for the (very likely) possibility that you don't want to go over the whole discussion, this is the summary of it (also explained in the few last posts):

  1. this feature is not officially supported yet, it will be added with spacemacs 0.300, if you want to use it now, you'll need to use the develop branch.

  2. Put your theme in a folder under ~/.emacs.d/private/local/

  3. add (firebelly :location local) to 'dotspacemacs-themes in your .spacemacs

Worth noting: @joyanmo's solution should also work (even though I haven't tried it myself), and is even suggested in the discussion above, but isn't the official solution

NivPgir
  • 17
  • 2