Emacs ONTOP is an extension to the Emacs ONBOARD starterkit with certain niceties and setups for several programming languages.
- Compilers, language servers and build systems must be installed separately.
eon-lang-commonlisp: Complete Common Lisp setup with Sly. Just install SBCL with your package manager and then Quicklisp. The setup covers most needs.
eon-lang-clojure: The Clojure setup is just a basic setup with Cider right now, but is usable out-of-the-box. Further tweaks might provide an even better experience.
eon-lang-julia: The Julia setup is based on the Julia language server, Snail and Tree-sitter. The REPL runs within Eat, the embedded terminal emulator.
eon-lang-ocaml: OCaml setup in Emacs based on Tuareg and Merlin. Completion in Utop is working, with completion candidates provided by Merlin.
eon-lang-haskell: Interactive Haskell setup based on Haskell language server. The GHCi provides a much better experience within Emacs than in a terminal. This configuration works well with both Cabal and Stack projects, both on Linux and MacOS.
eon-lang-elixir: Elixir setup comes with the language server pre-configured (Elixir-ls), Tree-sitter, Mix integration and a REPL. Autocompletion doesn’t work in the REPL yet, unfortunately. “Jump-to-definition” doesn’t work either, but that limitation seems to come from the language servers themselves.
eon-lang-erlang: Comprehensive Erlang setup with Erlang shell, Tree-sitter and Org-mode babel for notebook-style literate programming.
eon-lang-lfe: Basic LFE setup with REPL.
eon-lang-gleam: Basic setup for the Gleam language with LSP and Treesitter support. No interactive programming, since Gleam doesn’t come with a REPL.
eon-lang-scheme: The Emacs Scheme setup supports eight major Scheme implementations via Geiser and comes with SRFI-browser and structural editing. The Scheme implementations have either more or less comprehensive tooling, hence the user experience varies. Tested on Debian Linux with GNU Guile (most interactive experience and easy setup) and Chicken scheme (rather bare-bones).
eon-lang-racket: The Racket setup based on Racket-mode provides more interactivity than DrRacket, and the new “racket-hash-lang-mode” supports arbitrary syntax for DSLs in Emacs. However, the syntax highlighting could be configured more in-depth.
eon-lang-lua: Basic Lua setup with REPL and lua-language-server. Rudimentary setup suitable for editing Lua code – the available features don’t come close to the Lua IDE ZeroBrane Studio, TextAdept or Neovim.
eon-lang-webdev: Just basic HTML, CSS and JavaScript editing and linting (linters have to be installed separately); includes web-mode. Highly under-developed, since I don’t do web stuff usually.
- 1. Clone this repository:
git clone https://github.com/monkeyjunglejuice/emacs.ontop.git ~/.emacs.ontop- 2. Put this line into your Emacs init file (
~/.emacs.d/init.elor~/.emacs):
(load-file "~/.emacs.ontop/eon-init.el")- 3. Edit
~/.emacs.ontop/eon-setup-modules.elto select your desired modules, then restart Emacs. The installation process begins: Emacs will download and install the required Emacs packages from MELPA. It will take approx. 1–3 min, depending on your module selection and internet speed. If the process gets interupted, that’s no problem – just restart Emacs, and it will continue. There will be some warnings, which can be ignored – these are mostly related to the compilation of the downloaded Emacs packages.
Look into the module files in order to learn about the commands and key bindings – all documentation lives there. If you want to change settings, re-define these settings within your init.el or eon-setup-personal.el.
“M-x” — Press <Alt>+<x> to show all commands “M-x eon-” shows all commands coming with Emacs ONTOP and Emacs ONboard “C-g” — Get out! Press <Ctrl>+<g> to cancel whatever happens (or hit 3x <ESC> in utter panic)
- Don’t be invasive: provide add-ons rather than replacements. In the large: Emacs ONTOP tries to integrate into your existing Emacs config rather than aiming to replace it. And in the small: global variables are often used across packages. Be careful not to `setq’ these variables, but do `add-to-list’ insted (this negligence appears very often in instructions for how to setup packages).
- Consistency: Adhering to Emacs conventions and doing common actions in the same way is crucial for the user experience (e.g. same Eglot keybindings across all languages; consistant keybindings for “evaluate expression”, “compile”, etc.). If in doubt, follow Emacs conventions, `eon-commonlisp.el’ or `eon-ocaml.el’.
- Beginner-friendly: No complex “Emacs-framework”. Novice Emacs users willing to touch Elisp code should be able to follow, adapt code and and immediately celebrate their achievements. Code should be decoupled and modificable, separately usable and stealable – if that leads to some redundancy, it’s fine.
- Reading the documentation in the Elisp files shall be a reward in itself. Include tipps, tricks, alternatives.
- Carefully pre-configured: the goal is not to pack as much features as possible for each language, but to identify the subtleties, refine iteratively, and work out best practices.
- Portable: Emacs ONTOP Should work on recent Linux/Unix, Windows and MacOS systems; Compatibility with Emacs versions from what’s in Debian stable upwards (Debian is the measure of all things)
- Rely only on Emacs features enabled by the GNU Emacs distribution’s default build options (smallest common denominator).
Emacs ONTOP is largely based on setup recommendations by the respective package authors, but also ideas from personal configs, starter-kits and my own GNU-shaving. It has been home-grown since 2014, and unfortunately I can’t trace all code and ideas back to where it came from in order to give proper credit.