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 / Elm
- Ruby / Ruby on Rails
- CSS / LESS / SASS / SCSS
- Javascript / Typescript / Coffeescript
- HTML / HAML / Markdown / Textile / ERB
- Rust
- Python
- Clojure (with Cider and nRepl)
- Common Lisp (with Slime)
- PHP
- Erlang
In particular, there's a nice config for autocompletion with company, and flycheck is used to immediately highlight syntax errors in Ruby, Python, Javascript, Haskell and a number of other languages.
The config should run on Emacs 24.4 or greater and is designed to degrade smoothly - see the Travis build - but note that much newer versions are required for an increasing number of key packages, so to get full functionality you should use the latest Emacs version available to you.
Some Windows users might need to follow these instructions to get TLS (ie. SSL) support included in their Emacs.
To make the most of the programming language-specific support in this config, further programs will likely be required, particularly those that flycheck uses to provide on-the-fly syntax checking.
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.
Update the config with git pull
. You'll probably also want/need to update
the third-party packages regularly too:
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.
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.
You might also want to check out emacs-starter-kit
and prelude
.
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
💝 Support this project and my other Open Source work
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 Emacs - currently 26.1.
You can support the development of Prelude via PayPal, Salt, Patreon and Liberapay.
Assuming you're using an Unix-like OS (*BSD
, GNU/Linux
, macOS
, Solaris
,
etc), you already have Emacs 24.4+ 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, forgetting about the rest of this manual.
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.
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.
Check out our user manual for more information.
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 is available via several channels:
- Prelude's Google Group emacs-prelude@googlegroups.com
- Prelude's Freenode channel (
#prelude-emacs
) - Gitter
Here's a list of all the people who have contributed to the development of Emacs Prelude.
Bug reports and suggestions for improvements are always welcome. GitHub pull requests are even better! :-)
Cheers,
Bozhidar
1ec67804787b43153f3aaaf9feed3fa9d1d5fa06