Finally, a simple base Emacs configuration framework
A word for beginners:
Spartan Emacs is a framework, not a starter kit. It does not teach Emacs. If you are new, welcome, and please begin by checking out `M-x help-with-tutorial`. `M-x` means meta (‘alt’) + `x` and then `help-with-tutorial` Return (enter) to begin. One might follow up with `An Introduction to Programming in Emacs Lisp` additionally. The manuals may all be found at https://www.gnu.org/software/emacs/manual/
git clone https://github.com/grandfoobah/spartan-emacs.git ~/.emacs.d
- KISS, clean configuration and a comprehensible layers system
- No third party packages install by default - prefers built-ins
- Uses lightweight, mostly-vanilla configured layer packages
- Popular langs come with optional layers that are preconfigured with the best modes, a REPL, and intelligent LSP auto-completion, find def, etc. via Eglot
- Project Awareness is available with Projectile, VC with Magit
- Support for Evil mode with spartan-evil layer
- Load time with all layers enabled is less than 1 second on a 10 year old laptop - without resorting to use-package, deferrals, pdumper or hacks.
- Tested on Linux, but should work also work fine on any gnu/bsd/macos base
- Tuned for ultimate performance using the latest pgtk gccemacs with native json parsing with eglot language server protocol (not required, just recommended)
- No syntax highlighting
- Edit init.el and M-x spartan-reconfigure
- Enabled layer packages are installed during init
- Then layer packages are configured in the after-init-hook
- Finally layer packages may be user local customized in spartan.d/
(all lisp files in spartan.d/ load last, during the emacs-startup-hook)
NOTE: The idea here is to provde everywhere the get up and going configuration, this means proper syntax formatting with an interactive repl for rapid development, and intelligent auto-completion and find definition, etc. via eglot’s minimal language server protocol implementation.
Debugging is provided within many of the languages itself, e.g. Python and Ruby have builtin debuggers. With C, one may use M-x `gdb’ with ‘gdb’, etc.
With compiled languages, one might use <f5> and set the compile command to something instead of make if needed, etc.
- Emacs Lisp (paredit, builtins)
- Common Lisp (paredit, slime)
- C / C++ (lsp)
- Clojure, Clojurescript (paredit, lsp, inf-clojure)
- Racket (paredit)
- Scheme (paredit)
- Bash (shellcheck, lsp)
- Python (lsp)
- Ruby (lsp)
- Rust (lsp)
- Solidity (lsp)
- Go (lsp)
- Javascript / Typescript (lsp)
- Extra cfg file formatting / syntax support: Terraform, Nix, Systemd, Nginx, JSON, YAML, XML
- Fork repo, clone it, own it
- git pull
- M-x package-list-packages => U => x
- Default emacs binds (unless you enable evil)
- Principally, we want to use short M-x aliases, while also putting global function binds on C-c and language specific binds on M-m prefixes
- Do look at spartan-binds-global.el to get
the general idea,
M-x ff (find files) , M-x rg (rgrep files) , M-x kr (browse-kill-ring) , M-x ed (ediff) , M-x git (magit) , M-x lint (flymake) , M-x pb (webpaste) , M-x sh (better-shell) , <f5> (compile) , <f6> (script execute) …
- Also see spartan-eglot.el for language-server-protocol binds
- And for language-specific files, see relevant language file e.g. spartan-python.el
brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt grep bash
echo '/opt/homebrew/bin/bash' | sudo tee -a /etc/shells
chsh -s /opt/homebrew/bin/bash
Automatically “Linuxify’s” your Emacs environent https://github.com/a-schaefers/spartan-emacs/commit/0ba55e7580ca70f9ef172a5464bba8bd575df7b8