2

I'm setting some personal preferences to my spacemacs. Some of them are in init.el file, some other in .spacemacs file.

If I recall correctly that's because some of the settings did not work other way. But I'm concerned about the proper way of doing such things.

maybe is mandatory to use .spacemacs instead of init.el?

which should be the preferred method? which are the main functions of both files?

thanks

2

The .spacemacs file actually has two places to put configuration code; dotspacemacs/user-init and dotspacemacs/user-config. The user init is run before any layers are loaded and the user config after all layers are loaded. Most code should go in he user config. Though as you said, some code doesn’t work there and needs to be in the user init. This includes variables that need to be loaded before the packages are initialized. AFAIK there is nothing that should need to go in init.el. Everything you have in init.el should be able to go in dotspacemacs/user-init.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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