Getting started with Spacemacs
- Install prerequisites: Emacs version 27.1, Java 17 and the Recommended Command Line tools.
- Clone or download Spacemacs, removing
~/.emacs.dif it already exists
- [optional] Install Fira Code font (change
dotspacemacs-default-fontto a name of a font on your operating system in
.spacemacs.d/init.elin step 4)
- Clone the practicalli/spacemacs.d configuration to add common layers for Clojure development. Or start Emacs and use the Spacemacs install wizard for basic config, follow the manual configuration section for additional features.
- Add fonts for doom modeline theme
Use your favourite git client or the following command in a terminal window to clone the
develop branch of Spacemacs:
git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
Use Spacemacs develop branch until version 0.300 released
Many features in this guide are only available in the
develop branch of Spacemacs until version 0.300 of Spacemacs is released.
develop branch is stable enough to used for your daily work and contains fixes that will not be available in Spacemacs 0.200.
Install Fira Code font
practicalli/spacemacs.d configuration uses Fira Code for Emacs as it provides Ligatures. The Fira Code font is optional, use whatever font you prefer so long as is installed in the operating system fonts.
To use a different font when using the practicalli/spacemacs.d, edit
.spacemacs.d/init.el and update the value for
dotspacemacs-default-font to a name of a font on your system.
Clone Practicalli Spacemacs configuration
Open practicalli/spacemacs.d GitHub website and fork the repository to your own account (this makes it easier to save your own configuration).
Clone your fork of Practicalli Spacemacs configuration to
.spacemacs.d directory, substituting your own github account name for
my-github-account in the command below.
git clone email@example.com:my-github-account/spacemacs.d.git ~/.spacemacs.d
Cloning the repository adds a
.spacemacs.d/init.el configuration file which should be used instead of
~/.spacemacs, so ensure a
.spacemacs file does not exist before running Spacemacs.
Before running Emacs, install Fira Code fonts or update
dotspacemacs-default-font value in
.spacemacs.d/init.el to a name of a font installed on the operating system.
Version Control the Spacemacs Configuration
~/.spacemacs.d provides a simple way to version control your Spacemacs configuration, including snippets and layouts. This is the approach taken with practicalli/spacemacs.d
.spacemacs.d/init.el is the main configuration file, replacing
.spacemacs file exists when Emacs starts it will be used instead of
If the practicalli.spacemacs.d repository is not used, then a
.spacemacsconfiguration file is created when Spacemacs first runs. Read the additional configuration section to add support for Clojure and many other development tools. The
.spacemacsfile can be backed up at a GitHub Gist,
SPC g g b.
.spacemacs.d/init.el configuration separates the Emacs settings into a
emacs-custom-setting file within
emacs-custom-setting file only needs to be added to version control if the Emacs
customize menu has been used to define different settings.
emacs-custom-file is defined in the
dotspacemacs/user-init of the Spacemacs configuration
(setq custom-file (file-truename (concat dotspacemacs-directory "emacs-custom-settings.el"))) (load custom-file)
A specific path could also be used to define the location of the custom file:
(setq custom-file "~/.emacs.d/.cache/custom-settings")
Adding icon fonts for doom modeline
practicalli/spacemacs.d configuration uses the modern looking doom modeline theme, which requires a few fonts and icons.
SPC SPC all-the-icons-install-fonts once Spacemacs is running will install the fonts.
SPC q r to restart Spacemacs and see the finished results
Spacemacs is ready for action
Spacemacs is now up and running and ready to take on the world.
If you already know how to use Spacemacs, jump to the Clojure Projects section, otherwise look through the Spacemacs Basics section to learn how to use Vim style editing and work with files, buffers and windows in Spacemacs.