Emacs Prelude

repository·master·Indexed 26 days ago

https://github.com/bbatsov/prelude

A distribution for GNU Emacs 29.1+ designed to enhance the default experience with sane defaults, a curated set of packages, and a modular architecture. It provides a foundation for custom configurations, featuring automatic on-demand installation of programming modes, Eglot as the default LSP client, and integrated support for tree-sitter. Key included packages include Magit, Projectile, and Which-key.

Tokens
20.8K
Snippets
68
Records
191
Agent score
90%

What's inside Emacs Prelude

  1. Overview of Prelude LaTeX module

    master

    The Prelude LaTeX module provides a comprehensive LaTeX editing setup powered by AUCTeX.

    Included Packages

    • auctex: Advanced TeX/LaTeX editing.
    • cdlatex: Fast insertion of math symbols and environments.
    • company-auctex: company-mode backend for AUCTeX (active when company is available).
    • smartparens-latex: LaTeX-aware pair handling via smartparens.

    Default AUCTeX Configuration

    Prelude automatically applies the following settings:

    • Auto-save and auto-parse of TeX files are enabled.
    • PDF mode is the default output format.
    • Multi-file support: TeX-master is set to nil, prompting AUCTeX to ask for the master file.
    • Auto-fill mode is enabled for line wrapping.
    • Abbrev mode is enabled for common LaTeX abbreviations.
    • Smartparens is enabled for delimiter matching.

    macOS Specifics

    On macOS, Prelude configures the open command as the default viewer for DVI, PDF, and HTML output.

  2. Overview of Emacs Prelude features

    master

    Emacs Prelude is an Emacs distribution designed to enhance the default experience through sane defaults, a curated set of 3rd party packages, and a modular architecture. Key features include:

    • Improved UX aligned with Emacs traditions.
    • Automatic on-demand installation of major programming modes.
    • A curated set of high-quality 3rd party packages.
    • Simple modular architecture for easy customization.
    • Less opinionated than other distributions (e.g., it does not enable evil-mode by default).
  3. Use MisTTY for shell/comint hybrid terminal emulation

    master
    MisTTY is a pure Emacs Lisp shell/comint hybrid built on term.el. It provides full terminal emulation for TUI programs while allowing ordinary Emacs editing and motion on the command line. Unlike vterm, it does not require compiling a native module.
  4. Erlang development features in Prelude

    master

    The Erlang module in Prelude provides the following capabilities:

    • Erlang Mode: Bundles erlang-mode for editing Erlang source files.
    • Flymake: Automatically enables flymake-mode for on-the-fly syntax checking when erlang-start is available.
    • Projectile Integration: If Projectile is enabled, erlang-compile-function is configured to use projectile-compile-project. This allows you to compile using your project's build tool via the C-c C-k keybinding.
  5. Use Prelude Evil for Vim emulation

    master

    The evil module provides Vim emulation in Emacs using evil-mode. It bundles several extensions to enhance the Vim-like experience within the Prelude environment, including:

    • evil: The core extensible vi layer.
    • evil-surround: Emulates vim-surround for manipulating surroundings.
    • evil-visualstar: Allows searching visual selections with *.
    • evil-numbers: Enables incrementing/decrementing numbers.
    • goto-chg: Enables jumping to recent changes using g-; and g-,.
  6. Use base Helm features with prelude-helm

    master

    The prelude-helm module provides a base setup with the following features:

    • Fuzzy matching for buffers.
    • Helm Projectile integration (requires Projectile to be enabled).
    • Google suggest support via curl (when available).
    • The command prefix is remapped from C-x c to C-c h to prevent accidental Emacs exits.
  7. Use the Prelude Ivy module for completion

    master

    The Ivy module provides a lightweight completion framework for Emacs using ivy, swiper, and counsel.

    Important: This module is an alternative to the Helm, Ido, or Vertico modules. You should only enable one completion framework in your Prelude configuration to avoid conflicts.

  8. Clojure development environment in Prelude

    master

    The Prelude Clojure module provides a foundation for Clojure development by bundling:

    • clojure-mode: The primary major mode for Clojure programming (used instead of clojure-ts-mode by default to maintain compatibility with Emacs 29.1+ and CIDER/clj-refactor APIs).
    • CIDER: An interactive programming environment for Clojure.

    Note that advanced CIDER plugins like clj-refactor or sayid are not installed by default to avoid overwhelming new users, but can be added manually.

  9. Use the YAML module for editing YAML files

    master

    The yaml module bundles yaml-mode to provide enhanced editing capabilities for YAML files. When enabled, it provides:

    • whitespace-mode: Visualizes whitespace, which is critical for YAML's indentation-sensitive syntax.
    • subword-mode: Enables CamelCase aware editing.
    • Automatic whitespace cleanup: Automatically cleans up whitespace when saving a file.
  10. Use Corfu for minimal in-buffer completion

    master

    Corfu is a lightweight, modern alternative to Company for in-buffer completion. It leverages Emacs' built-in completion-at-point infrastructure and works with standard completion styles like orderless.

    Important: This module is mutually exclusive with the company module. You must enable either Corfu or Company, but not both.