Personal Spacemacs user configuration (~/.spacemacs.d).
It started from the Practicalli Spacemacs configuration by John Stevenson, which is built around Clojure development, and has since been extended for C/C++, CUDA, Go, Java, PHP and Python.
- Editing: Vim style,
doom-gruvboxtheme, doom mode-line, Fira Code with ligatures in programming modes - Languages: Clojure (CIDER + LSP), C/C++ (clangd), CUDA (
cuda-mode), Go, Java, PHP, Python, JavaScript, HTML, YAML, JSON, Markdown, Emacs Lisp - LSP: quiet by default (no doc popups, no sideline); both are switched on again in C/C++ buffers only
- Tools: Magit with Forge, DAP debugging, Docker, Treemacs, Ranger, vterm, tree-sitter highlighting, org-journal
- Snippets: yasnippet templates for Clojure, ClojureScript, Markdown, Org and shell in
snippets/
- Emacs 28.2 or newer
- Spacemacs on the
developbranch in~/.emacs.d - Fira Code font
ripgrepfor project searchclangdat/usr/bin/clangdfor C/C++cmake,libtool-binandlibvterm-devto build the vterm moduleaspellwith the dictionaries you need (e.g.aspell-de) for spell checking- The language servers for the other languages you use; lsp-mode offers to install most of them on first use
For CUDA development, the CUDA toolkit (nvcc, cuda-gdb) must be on the PATH that Emacs sees.
git clone https://github.com/MehmetGoekce/spacemacs-config.git ~/.spacemacs.dRemove an existing ~/.spacemacs file, as it takes precedence over ~/.spacemacs.d/init.el. Start Emacs; Spacemacs installs all packages on first launch.
init.el is the main Spacemacs configuration file: layers and their variables, Spacemacs settings, and additional packages.
dotspacemacs/user-config contains no configuration itself. It loads these files, in order:
| File | Content |
|---|---|
user-config.el |
General tweaks, Clerk notebook command, lsp-ui in C/C++ buffers |
clojure-config.el |
clojure-mode options, Portal data inspector commands, custom Clojure functions |
theme-config.el |
Custom doom mode-line |
version-control-config.el |
Magit and Forge |
Present but not loaded (their load calls in init.el are commented out):
org-config.el— TODO workflow and faces for Orgeshell-config.el— custom eshell promptdeprecated-config.el— archive of retired configuration
To add your own configuration, create a <topic>-config.el file and add a load for it in dotspacemacs/user-config.
emacs-custom-settings.el— written by Emacs Customize, loaded if present.spacemacs.env— environment variables captured by Spacemacs; regenerate withSPC SPC spacemacs/force-init-spacemacs-envafter changing your shellPATHsite-lisp/— local package clones
.cu and .cuh files open in cuda-mode, which derives from c++-mode, so clangd and the C/C++ LSP settings apply. The , major-mode key bindings of the C/C++ layer are not available there; use the global commands instead:
| Key | Action |
|---|---|
SPC c c |
Compile, e.g. nvcc -O3 file.cu -o prog |
SPC c r |
Recompile |
SPC SPC gdb |
Debug, with cuda-gdb -i=mi ./prog (build with -g -G) |
clangd needs a compile_commands.json in the project, and usually a .clangd file that removes the nvcc-only flags.
Based on practicalli/spacemacs-config. The Practicalli Spacemacs book explains the Clojure workflow this configuration was designed for.
Licensed under Creative Commons Attribution-ShareAlike 4.0 International, the same license as the original.