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

)

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.