Emacs/Installing haskell-mode: Difference between revisions

From HaskellWiki
m (Added infobox.)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Emacs|*]]
Information available at [https://github.com/haskell/haskell-mode github].
{{Haskell infobox}}
 
=== Where to get haskell-mode ===
 
The source for the package is currently hosted on [https://github.com/haskell/haskell-mode the Haskell organization on Github.] The installation procedure is documented there.
 
On Debian you can use your package manager :
 
    $ apt-get install haskell-mode
 
=== Installation ===
 
Download and unpack the basic mode and modules into a suitable directory, e.g. <code>~/lib/emacs/haskell-mode/</code> where <code>~</code> stands for your home directory.
 
Assuming you have placed the basic mode <code>haskell-mode.el</code> and the modules you want to use in the directory <code>~/lib/emacs/haskell-mode/</code>, add the following command to your init file (<code>~/.emacs</code>):
 
<code>
    (load "~/lib/emacs/haskell-mode/haskell-site-file")
</code>
 
adding the following lines according to which modules you want to use. They are all optional.
 
<code>
    (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
</code>
 
You should choose an indentation mode by uncommenting (remove the ";;") at the start of one of the lines. Note that the three indentation modules are mutually exclusive - add at most one.  Note that the line of code for simple indentation is commented out (using a preceding ;) in preference for the more advanced indentation module.
 
<code>
    ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
    (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
    ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
</code>
 
Installation is now complete!

Latest revision as of 12:15, 6 December 2016

Information available at github.