Skip to content

Install Spacemacsλ︎

Install prerequisites: Emacs, Java 17, Clojure CLI and Command Line tools

  1. Clone or download Spacemacs, first removing ~/.emacs.d if it exists
  2. Clone practicalli/spacemacs-config user configuration. Or start Emacs and use the Spacemacs install wizard, follow the manual configuration section
  3. Install Fira Code font (or update dotspacemacs-default-font to a name of a font on your operating system in the Spacemacs user configuration)
  4. Install All The Icons fonts to support the doom modeline theme

Clone Spacemacsλ︎

Use your favourite git client or the following command in a terminal window to clone Spacemacs:

git clone https://github.com/syl20bnr/spacemacs ~/.config/emacs
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d

Clone Practicalli Spacemacs configurationλ︎

Clone practicalli/spacemacs-config configuration or first create a fork and clone that fork

Using SSH

git clone git@github.com:practicalli/spacemacs-config.git ~/.config/spacemacs

Using HTTPS

git clone https://github.com/practicalli/spacemacs-config ~/.config/spacemacs
~/.config/spacemacs/init.el is the main configuration file, ensure ~/.spacemacs file does not exist as that file would take precedence.

Set the SPACEMACSDIR environment variable to the ~/.config/spacemacs directory so that Spacemacs will find this location. Add to ~/.profile to support launching Emacs from a desktop launcher and the shell configuration, e.g. ~/.bashrc for bash, ~/.zshenv for Zshell.

SPACEMACSDIR and XDG configurations
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
export XDG_CACHE_HOME=$HOME/.cache

# Set XDG location of Emacs Spacemacs configuration
export SPACEMACSDIR="$XDG_CONFIG_HOME/spacemacs"

Using SSH

git clone git@github.com:practicalli/spacemacs-config.git ~/.spacemacs.d

Using HTTP

git clone https://github.com/practicalli/spacemacs-config ~/.spacemacs.d

~/.spacemacs.d/init.el is the main configuration file, ensure ~/.spacemacs file does not exist as that file would take precedence.

Emacs custom settings

init.el configuration separates Emacs custom settings into a emacs-custom-setting file. emacs-custom-setting should be added to version control if the Emacs customize menu has been used to define 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")

Install Fira Code fontλ︎

Install Fira Code

practicalli/spacemacs-config uses Fira Code, a mono-spaced font designed for source code and includes ligatures and many other features.

Fira Code font - ligatures for Emacs and Clojure code

Use a different font with practicalli/spacemacs-config

To use a different font when using the practicalli/spacemacs-config, edit init.el and update the value for dotspacemacs-default-font to a name of a font on your system.

Emacs Packagesλ︎

Spacemacs automatically downloads and compiles Emacs packages when Emacs is run.

If Emacs supports native compilation, then the compilation process can take longer, although Emacs should run many tasks faster or more efficiently.

Space a p opens proced showing active Emacs processes, such as native compilation

Icon Fontsλ︎

practicalli/spacemacs-config configuration uses the modern looking doom modeline theme, which requires fonts icons.

Once Spacemacs is running, issue the following commands to install a wide range of fonts.

  • SPC SPC all-the-icons-install-fonts
  • SPC SPC nerd-icons-install-fonts

Space q r to restart Spacemacs and see the finished results

Spacemacs - doom-gruvbox-light theme example Spacemacs - doom-gruvbox-light theme example

Spacemacs ready for actionλ︎

Spacemacs is now up and running and ready to take on the world.

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.