1

My default spacemacs dotfile defines dotspacemacs/user-config, and I suppose my user config is supposed to go inside this function. However the file itself is quite large and I'd like to isolate my own settings in a separate file.

I've put my dotfile in ~/.spacemacs/init.el. I'd like the user config to be loaded from ~/.spacemacs/user-config.el. How can I do this?

(defun dotspacemacs/user-config ()
  "Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."

 ;; load stuff from user-config.el here

)
Jessica
  • 133
  • 4

1 Answers1

1

(load 'user-config)

Notice that you can and should put the whole dotspacemacs/user-config function in that file. This avoids reloading any files if the function is called more than once.

Type C-h f to get help about a function by typing its name.

db48x
  • 15,741
  • 1
  • 19
  • 23