Skip to content
A minimal emacs configuration for haskell programming
Emacs Lisp
Branch: master
Clone or download

Latest commit

Latest commit a0b045c Jan 2, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.emacs.d fix company completion Nov 28, 2019
.emacs update with neotree and more information regarding stack exec -- ghci Aug 31, 2019
LICENSE Initial commit Nov 19, 2017
README.md Explain `M-,` Jan 2, 2020
preview.gif adding a gif preview Nov 20, 2018

README.md

minimal-haskell-emacs

A minimal emacs configuration for haskell programming using dante and friends.

  • Coming from Vim? Try the evil branch which includes vim key bindings

See it in action

Visit dante's README.org to see the features list for Haskell editing.

Package management approach is based on this tutorial.

To get a haskell compiler, I recommend downloading Stack and running stack setup to install GHC.

Since stack setup does not install ghci in the global environment, you may want to run this command to create a ~/.local/bin/ghci executable that will run with the global stack environment:

if [ ! -f ~/.local/bin/ghci ]; then
    echo "#\!/bin/bash" > ~/.local/bin/ghci;
    echo "stack exec -- ghci \$@" >> ~/.local/bin/ghci;
    chmod +x ~/.local/bin/ghci;
    echo "~/.local/bin/ghci created."
else
    echo "~/.local/bin/ghci already exists."
fi

To install this configuration, clone the repository and place the following files at your home directory:

  • .emacs - emacs will call this file first which will trigger the whole thing. Also contains a few convenient tweaks.
  • .emacs.d/my-packages.el - contains the list of packages to install when starting emacs
  • .emacs.d/my-loadpackages.el - defines how to enable and setup the packages we use

WARNING: Backup your changes to all your emacs related files before running the following commands as they will override your files!

So the steps are:

git clone https://github.com/soupi/minimal-haskell-emacs
cp minimal-haskell-emacs/.emacs  ~/
cp -r minimal-haskell-emacs/.emacs.d ~/

Now just run Emacs and start hacking!


Extra useful shortcuts:

Files:

Buffers:

  • F7 - Open buffers list
  • C-backtick / C-~ - next / previous buffer

Windows:

  • C-tab - switch window
  • M-<arrow> - move to window in direction

Haskell:

  • C-: - In a haskell buffer, search this word in hoogle
  • M-, - Jump back after 'Goto definition' (M-.)
You can’t perform that action at this time.