Convert Figma logo to code with AI

bbatsov logoprelude

Prelude is an enhanced Emacs 25.1+ distribution that should make your experience with Emacs both more pleasant and more powerful.

5,100
1,850
5,100
42

Top Related Projects

19,200

An Emacs framework for the stubborn martian hacker

23,638

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!

6,839

An Emacs configuration bundle with batteries included

Centaur Emacs - A Fancy and Fast Emacs Configuration

🍀 Next-generation, purely functional package manager for the Emacs hacker.

Emacs client/library for the Language Server Protocol

Quick Overview

Prelude is an enhanced Emacs distribution that aims to improve the default Emacs experience. It provides a curated set of packages, sensible defaults, and a modular configuration system, making it easier for both beginners and experienced users to set up and use Emacs effectively.

Pros

  • Comprehensive out-of-the-box configuration with sensible defaults
  • Modular design allows for easy customization and extension
  • Includes a curated set of popular and useful packages
  • Regular updates and active community support

Cons

  • May conflict with existing Emacs configurations
  • Some users might find it overwhelming compared to vanilla Emacs
  • Potential performance impact due to the inclusion of many packages
  • Learning curve for users accustomed to different Emacs setups

Getting Started

  1. Backup your existing Emacs configuration:

    mv ~/.emacs.d ~/.emacs.d.bak
    
  2. Clone the Prelude repository:

    git clone https://github.com/bbatsov/prelude.git ~/.emacs.d
    
  3. Launch Emacs. Prelude will automatically install required packages.

  4. (Optional) Create a personal configuration file:

    touch ~/.emacs.d/personal/personal.el
    
  5. Add custom configurations to personal.el:

    ;; Example: Enable global line numbers
    (global-display-line-numbers-mode 1)
    
    ;; Example: Set a custom theme
    (load-theme 'zenburn t)
    
  6. Restart Emacs for changes to take effect.

For more detailed instructions and customization options, refer to the official Prelude documentation on GitHub.

Competitor Comparisons

19,200

An Emacs framework for the stubborn martian hacker

Pros of Doom Emacs

  • More extensive configuration options and modules
  • Faster startup time and better performance optimization
  • Larger and more active community, with frequent updates

Cons of Doom Emacs

  • Steeper learning curve for beginners
  • More complex configuration process
  • Potential for conflicts between modules

Code Comparison

Prelude configuration example:

(prelude-require-packages '(auctex cdlatex))
(setq prelude-flyspell t)
(setq prelude-guru nil)

Doom Emacs configuration example:

(doom! :lang
       (latex +cdlatex)
       :checkers
       (spell +flyspell)
       :editor
       (evil +everywhere))

Summary

Doom Emacs offers more advanced features and customization options, making it suitable for power users who want to fine-tune their Emacs experience. It has a larger community and more frequent updates, but comes with a steeper learning curve.

Prelude, on the other hand, provides a simpler and more straightforward configuration process, making it more accessible for beginners. It offers a curated set of packages and sensible defaults, but may lack some of the advanced features and performance optimizations found in Doom Emacs.

The choice between the two depends on the user's experience level with Emacs and their specific needs for customization and features.

23,638

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!

Pros of Spacemacs

  • More extensive and feature-rich, with a larger community and ecosystem
  • Better integration with Evil mode for Vim-like editing
  • Includes a comprehensive configuration system with layers

Cons of Spacemacs

  • Steeper learning curve due to its complexity
  • Slower startup time compared to Prelude
  • May be overwhelming for users who prefer a simpler setup

Code Comparison

Spacemacs configuration example:

(setq-default
 dotspacemacs-configuration-layers
 '(
   helm
   auto-completion
   better-defaults
   emacs-lisp
   git
   markdown
   org
   (shell :variables shell-default-height 30 shell-default-position 'bottom)
   spell-checking
   syntax-checking
   version-control
   ))

Prelude configuration example:

(require 'prelude-c)
(require 'prelude-company)
(require 'prelude-css)
(require 'prelude-emacs-lisp)
(require 'prelude-js)

Both Spacemacs and Prelude aim to enhance the Emacs experience, but they take different approaches. Spacemacs offers a more comprehensive and customizable setup, while Prelude provides a simpler, more lightweight configuration. The choice between the two depends on the user's preferences and needs.

6,839

An Emacs configuration bundle with batteries included

Pros of emacs.d

  • More extensive configuration with a larger number of packages and customizations
  • Regularly updated with frequent commits and active maintenance
  • Includes advanced features like LSP integration and improved terminal support

Cons of emacs.d

  • Steeper learning curve due to its complexity and extensive customizations
  • May have slower startup times compared to Prelude's more streamlined approach
  • Less focus on providing a curated, opinionated setup for beginners

Code Comparison

emacs.d:

(require 'init-elpa)
(require 'init-exec-path)
(require 'init-frame-hooks)
(require 'init-themes)
(require 'init-osx-keys)

Prelude:

(require 'prelude-packages)
(require 'prelude-custom)
(require 'prelude-ui)
(require 'prelude-core)
(require 'prelude-mode)

Both configurations use a modular approach, loading separate initialization files for different aspects of the setup. However, emacs.d tends to have more granular modules, while Prelude groups functionality into broader categories.

Centaur Emacs - A Fancy and Fast Emacs Configuration

Pros of .emacs.d

  • More extensive configuration with a wider range of packages and customizations
  • Better organized structure with modular configuration files
  • Includes a dashboard and more visual enhancements out of the box

Cons of .emacs.d

  • Potentially slower startup time due to more packages and configurations
  • May be overwhelming for beginners due to its complexity
  • Less focus on minimalism compared to Prelude

Code Comparison

Prelude's core setup:

(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)

.emacs.d's core setup:

(setq package-archives
      '(("gnu"   . "http://elpa.gnu.org/packages/")
        ("melpa" . "http://melpa.org/packages/")
        ("org"   . "http://orgmode.org/elpa/")))
(require 'package)
(package-initialize)

Both configurations set up package management, but .emacs.d includes additional package archives and a slightly different initialization approach.

🍀 Next-generation, purely functional package manager for the Emacs hacker.

Pros of straight.el

  • Offers more granular control over package management
  • Provides reproducible package installations across different machines
  • Supports multiple package sources and version control systems

Cons of straight.el

  • Steeper learning curve for new users
  • Requires more manual configuration compared to Prelude's out-of-the-box setup
  • May have slower initial setup due to its on-demand package installation approach

Code Comparison

straight.el:

(straight-use-package 'use-package)
(use-package magit
  :straight t
  :bind ("C-x g" . magit-status))

Prelude:

(prelude-require-packages '(magit))
(global-set-key (kbd "C-x g") 'magit-status)

Summary

straight.el is a more advanced package management system that offers greater flexibility and reproducibility, but requires more setup and configuration. Prelude, on the other hand, provides a pre-configured Emacs environment with sensible defaults, making it easier for beginners to get started quickly.

straight.el is ideal for users who want fine-grained control over their Emacs packages and configurations, while Prelude is better suited for those who prefer a curated, ready-to-use Emacs setup with minimal configuration required.

Emacs client/library for the Language Server Protocol

Pros of lsp-mode

  • Provides comprehensive language server protocol (LSP) support for multiple programming languages
  • Offers advanced IDE-like features such as code completion, refactoring, and diagnostics
  • Actively maintained with frequent updates and improvements

Cons of lsp-mode

  • Steeper learning curve for configuration and setup compared to Prelude
  • May require additional setup for each language server
  • Can be resource-intensive, especially for larger projects

Code Comparison

lsp-mode configuration example:

(use-package lsp-mode
  :hook ((python-mode . lsp)
         (rust-mode . lsp))
  :commands lsp)

(use-package lsp-ui :commands lsp-ui-mode)

Prelude configuration example:

(require 'prelude-programming)
(require 'prelude-python)
(require 'prelude-rust)

Summary

lsp-mode offers more advanced IDE-like features and language-specific support through LSP, while Prelude provides a more opinionated and pre-configured Emacs setup. lsp-mode may require more setup but offers greater flexibility, whereas Prelude aims for a smoother out-of-the-box experience with sensible defaults for various programming languages.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

License GPL 3 CI Patreon Discord

Emacs Prelude

Prelude is an Emacs distribution that aims to enhance the default Emacs experience. Prelude alters a lot of the default settings, bundles a plethora of additional packages and adds its own core library to the mix. The final product offers an easy to use Emacs configuration for Emacs newcomers and lots of additional power for Emacs power users.

Prelude is compatible ONLY with GNU Emacs 25.1+. In general you're advised to always run Prelude with the latest stable Emacs release.

You can support the development of Prelude via GitHub Sponsors, ko-fi, PayPal and Patreon.

Features

  • Improved UX, that's still in line with Emacs traditions
  • Sane defaults of baseline Emacs functionality
  • Automatic installation of many major programming modes on demand
  • A curated set of 3rd party packages to enhance the base functionality
  • Simple modular architecture
  • Easy customization

Check out our user manual for more information.

Fast Forward

Assuming you're using an Unix-like OS (*BSD, GNU/Linux, macOS, Solaris, etc), you already have a recent version of Emacs installed, as well as git & curl you can skip the whole manual and just type in your favorite shell the following command:

$ curl -L https://git.io/epre | sh

You can now power up your Emacs, sit back and enjoy Prelude.

There are two environment variables you can use to control the source repository and the installation directory. To change the installation directory:

$ export PRELUDE_INSTALL_DIR="$HOME/.emacs.d" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh

To change the source repository:

$ export PRELUDE_URL="https://github.com/yourname/prelude.git" && curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh

Note that the installer will back up any existing .emacs file or .emacs.d since it will unpack Prelude's code in .emacs.d. If you're doing a manual install make sure you don't have a .emacs file or back up your existing .emacs.d directory manually.

Important: Don't forget to adjust your prelude-modules.el file in your personal directory once the installation is done. By default most of the modules that ship with Prelude are not loaded.

Philosophy

Prelude's philosophy is quite simple:

  • simple
  • easy to understand and extend
  • stable
  • a foundation for you to build upon, as opposed to some end-user product

This means that it intentionally doesn't pack all the bells and whistles that it could. Prelude aims to enhance the classic Emacs experience without deviating a lot from it - e.g. it would never enable something like evil-mode (vim keybindings) by default and so on.

All the third-party packages that it bundles are carefully vetted and are known to be of good quality and to have reliable maintainers. That generally means that Prelude's unlikely to immediate adopt some shiny new package, that has established tried and true alternatives.

In practice this translates to the following:

  • Prelude is less opinionated than distros like Spacemacs and Doom Emacs (meaning it's closer to the standard Emacs experience)
  • Prelude installs relatively few additional packages by default
  • Most modules in Prelude are opt-in instead of opt-out (you'll notice the default config enables only a handful of modules)
  • Most modules (e.g. modules for programming languages) are pretty short and feature setup only for essential packages (in some cases that be just the major mode for the language in question)
  • You don't really need to track Prelude's upstream - you're encouraged to just fork it and use it as the basis for your own configuration.

Remember that the ultimate goal of every Emacs user is to create an Emacs setup that reflects their own experience, needs, goals and ideas. Just like Lisp, Emacs is nothing but a raw building material for the perfect editing experience.

More installation options are discussed here.

User Manual

While Emacs Prelude is pretty simple at its core, it does have some specifics that are worth learning - e.g. configuration options, load order of modules and personal settings and so on.

Check out our user manual for more information.

You can also find a lot of information about specific Prelude features and the rationale behind them on my Emacs blog Emacs Redux.

crux and super-save

A lot of utility commands that used to be part of Prelude were eventually extracted to the crux package, so they'd be easily available to more people. These days Prelude simply depends on that package.

The super-save package also used to be part of Prelude in the past.

Known issues

Check out the project's issue list a list of unresolved issues. By the way - feel free to fix any of them and send me a pull request. :-)

Support

Support is available via several channels:

Contributors

Here's a list of all the people who have contributed to the development of Emacs Prelude.

Bugs & Improvements

Bug reports and suggestions for improvements are always welcome. GitHub pull requests are even better! :-)

License

Copyright © 2011-2023 Bozhidar Batsov and contributors.

Distributed under the GNU General Public License, version 3