Top Related Projects
An Emacs framework for the stubborn martian hacker
A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
Prelude is an enhanced Emacs 25.1+ distribution that should make your experience with Emacs both more pleasant and more powerful.
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
Purcell/emacs.d is a popular, well-maintained Emacs configuration framework. It provides a comprehensive set of customizations and packages for Emacs, aimed at enhancing productivity for developers and writers. This configuration is particularly useful for those who want a robust, pre-configured Emacs setup without having to build everything from scratch.
Pros
- Extensive package selection covering a wide range of development needs
- Regular updates and maintenance, ensuring compatibility with the latest Emacs versions
- Well-documented and organized codebase, making it easy to understand and customize
- Large user base, providing community support and contributions
Cons
- May be overwhelming for Emacs beginners due to its complexity
- Some users might find it too opinionated or feature-rich for their needs
- Potential performance impact on older or less powerful machines due to the number of packages
- Requires some time to fully understand and leverage all the included features
Getting Started
To get started with purcell/emacs.d:
-
Backup your existing ~/.emacs.d directory if you have one:
mv ~/.emacs.d ~/.emacs.d.backup
-
Clone the repository:
git clone https://github.com/purcell/emacs.d.git ~/.emacs.d
-
Launch Emacs. It will automatically download and install the required packages.
-
Restart Emacs to ensure all changes take effect.
For more detailed instructions and customization options, refer to the project's README file on GitHub.
Competitor Comparisons
An Emacs framework for the stubborn martian hacker
Pros of Doomemacs
- Faster startup time and overall performance
- Modular design with easy customization through modules
- Extensive documentation and active community support
Cons of Doomemacs
- Steeper learning curve for Emacs beginners
- Less "vanilla" Emacs experience, more opinionated configuration
- Potential compatibility issues with some third-party packages
Code Comparison
Doomemacs
(doom! :input
:completion
:ui
:editor
:emacs)
emacs.d
(require 'init-utils)
(require 'init-site-lisp)
(require 'init-elpa)
(require 'init-exec-path)
Doomemacs uses a declarative approach with modules, while emacs.d employs a more traditional structure with separate initialization files.
Summary
Doomemacs offers a modern, performance-focused Emacs configuration with modular design, while emacs.d provides a more traditional and vanilla Emacs setup. Doomemacs may be better suited for users seeking a pre-configured, feature-rich environment, while emacs.d might appeal to those who prefer a more hands-on approach to customization.
A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
Pros of Spacemacs
- More user-friendly with a comprehensive configuration system
- Extensive documentation and active community support
- Pre-configured layers for various programming languages and tools
Cons of Spacemacs
- Slower startup time due to its large codebase
- Steeper learning curve for Emacs purists
- May include unnecessary features for some users
Code Comparison
Spacemacs configuration example:
(setq-default
dotspacemacs-configuration-layers
'(
(auto-completion :variables
auto-completion-enable-snippets-in-popup t)
(git :variables
git-magit-status-fullscreen t)
(markdown :variables markdown-live-preview-engine 'vmd)
))
emacs.d configuration example:
(require-package 'auto-complete)
(require-package 'magit)
(require-package 'markdown-mode)
(add-hook 'after-init-hook 'global-auto-complete-mode)
(global-set-key (kbd "C-x g") 'magit-status)
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
Both repositories aim to provide a comprehensive Emacs configuration, but Spacemacs offers a more structured and feature-rich approach with its layer system. emacs.d, on the other hand, provides a more traditional and lightweight configuration that may be easier for experienced Emacs users to customize.
Prelude is an enhanced Emacs 25.1+ distribution that should make your experience with Emacs both more pleasant and more powerful.
Pros of Prelude
- More modular structure with separate configuration files for different features
- Includes a curated set of packages and configurations out-of-the-box
- Provides a consistent and opinionated setup across different systems
Cons of Prelude
- May include more packages than necessary for some users
- Less customized for individual preferences compared to emacs.d
- Steeper learning curve for users who want to modify the default configuration
Code Comparison
Prelude:
(prelude-require-packages '(avy
ace-window
crux
discover-my-major
diff-hl
easy-kill
expand-region
gist
git-timemachine
projectile
magit
move-text
operate-on-number
smartparens
undo-tree
zop-to-char))
emacs.d:
(require-package 'diminish)
(require-package 'scratch)
(require-package 'command-log-mode)
(require-package 'disable-mouse)
(require-package 'guide-key)
Both repositories aim to provide a comprehensive Emacs configuration, but they differ in their approach. Prelude offers a more structured and opinionated setup, while emacs.d provides a more flexible and customizable foundation. The code comparison shows that Prelude includes a larger set of pre-configured packages, while emacs.d takes a more minimalist approach, allowing users to add packages as needed.
Centaur Emacs - A Fancy and Fast Emacs Configuration
Pros of .emacs.d
- More comprehensive and feature-rich configuration
- Better organized and modular structure
- Includes additional productivity tools and enhancements
Cons of .emacs.d
- Potentially slower startup time due to more extensive configuration
- May require more system resources
- Steeper learning curve for new users
Code Comparison
emacs.d:
(require 'init-utils)
(require 'init-site-lisp) ;; Must come before elpa, as it may provide package.el
(require 'init-elpa) ;; Machinery for installing required packages
(require 'init-exec-path) ;; Set up $PATH
.emacs.d:
(require 'init-const)
(require 'init-custom)
(require 'init-funcs)
(require 'init-package)
(require 'init-base)
Both configurations use a modular approach, loading separate initialization files for different aspects of the setup. emacs.d focuses on utility functions, site-specific lisp, package management, and environment variables. .emacs.d emphasizes constants, custom settings, functions, package management, and base configuration.
The main difference lies in the organization and naming of the modules, with .emacs.d using a more descriptive naming convention. This may contribute to better readability and maintainability for some users.
🍀 Next-generation, purely functional package manager for the Emacs hacker.
Pros of straight.el
- Offers more granular control over package management
- Provides reproducible builds with lockfiles
- Supports multiple package sources and local packages
Cons of straight.el
- Steeper learning curve for new users
- Requires more manual configuration compared to emacs.d
- May have slower initial setup due to package cloning
Code Comparison
emacs.d:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
straight.el:
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
Emacs client/library for the Language Server Protocol
Pros of lsp-mode
- Focused specifically on Language Server Protocol (LSP) integration
- Supports a wide range of programming languages through LSP
- Actively maintained with frequent updates and improvements
Cons of lsp-mode
- Requires additional setup for each language server
- May have higher resource usage due to running language servers
- Less opinionated, requiring more user configuration
Code Comparison
lsp-mode configuration:
(use-package lsp-mode
:hook ((python-mode . lsp)
(rust-mode . lsp))
:commands lsp)
(use-package lsp-ui :commands lsp-ui-mode)
emacs.d configuration:
(require 'init-elpa)
(require 'init-exec-path)
(require 'init-editing-utils)
(require 'init-themes)
(require 'init-gui-frames)
Summary
lsp-mode is a specialized package for LSP integration in Emacs, offering broad language support and frequent updates. However, it requires more setup and may consume more resources. emacs.d, on the other hand, provides a comprehensive Emacs configuration with a wider range of features beyond just LSP support, but may not offer the same depth of language-specific functionality as lsp-mode.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
A reasonable Emacs config
This is my emacs configuration tree, continually used and tweaked since 2000, and it may be a good starting point for other Emacs users, especially web developers. These days it's somewhat geared towards OS X, but it is known to also work on Linux and Windows.
Emacs itself comes with support for many programming languages. This config adds improved defaults and extended support for the following, listed in the approximate order of how much I use them, from most to least:
- Haskell / Purescript / Elm / OCaml
- Ruby / Ruby on Rails
- SQL
- CSS / LESS / SASS / SCSS
- Javascript / Typescript
- HTML / HAML / Markdown / Textile / ERB
- Common Lisp (with Slime)
- Python
- Rust
- Clojure (with Cider and nRepl)
- PHP
- Erlang
Included is a nice setup for in-buffer autocompletion with corfu, and minibuffer completion using vertico.
flymake
(re-using backends from flycheck)
is used to immediately highlight syntax errors in Ruby, Python,
Javascript, Haskell and a number of other languages.
LSP support is provided using eglot
.
Various popular Emacs tools are included and configured here, such as
magit
, docker.el
, projectile
, org-mode
etc., but the focus is moderate
Supported Emacs versions
Use the latest released Emacs version available to you. The author typically uses the latest stable version.
The config should run on Emacs 27.1 or greater and is designed to degrade smoothly - see the CI build - but many enhancements may be unavailable if your Emacs is too old, and in general you should try to use the latest stable Emacs release like I do.
Other requirements
To make the most of the programming language-specific support in this config, further programs will likely be required, particularly those that flycheck or flymake use to provide on-the-fly syntax checking.
Installation
To install, clone this repo to ~/.emacs.d
, i.e. ensure that the
init.el
contained in this repo ends up at ~/.emacs.d/init.el
:
git clone https://github.com/purcell/emacs.d.git ~/.emacs.d
Upon starting up Emacs for the first time, further third-party
packages will be automatically downloaded and installed. If you
encounter any errors at that stage, try restarting Emacs, and possibly
running M-x package-refresh-contents
before doing so.
Updates
Update the config with git pull
. You'll probably also want/need to
update the third-party packages regularly too, because that's what I
do, and the config assumes it:
M-x package-list-packages, then U followed by x.
You should usually restart Emacs after pulling changes or updating
packages so that they can take effect. Emacs should usually restore
your working buffers when you restart due to this configuration's use
of the desktop
and session
packages.
Changing themes and adding your own customization
To add your own customization, use M-x customize, M-x
customize-themes etc. and/or create a file
~/.emacs.d/lisp/init-local.el
which looks like this:
... your code here ...
(provide 'init-local)
If you need initialisation code which executes earlier in the startup process,
you can also create an ~/.emacs.d/lisp/init-preload-local.el
file.
If you plan to customize things more extensively, you should probably just fork the repo and hack away at the config to make it your own! Remember to regularly merge in changes from this repo, so that your config remains compatible with the latest package and Emacs versions.
Please note that I cannot provide support for customised versions of this configuration.
Support / issues
If you hit any problems, please first ensure that you are using the latest version of this code, and that you have updated your packages to the most recent available versions (see "Updates" above). If you still experience problems, go ahead and file an issue on the github project.
-Steve Purcell
Top Related Projects
An Emacs framework for the stubborn martian hacker
A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
Prelude is an enhanced Emacs 25.1+ distribution that should make your experience with Emacs both more pleasant and more powerful.
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
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot