Skip to content

vyorkin/ormolu.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 

Repository files navigation

ormolu.el

Format Haskell source code using ormolu. Requires reformatter.el.

Usage

With use-package:

(use-package ormolu
 :hook (haskell-mode . ormolu-format-on-save-mode)
 :bind
 (:map haskell-mode-map
   ("C-c r" . ormolu-format-buffer)))

Without:

(push "~/.elib/contrib/reformatter.el" load-path)
(push "~/.elib/contrib/ormolu.el" load-path)
(load-library "ormolu")
(add-hook 'haskell-mode-hook 'ormolu-format-on-save-mode)

Additional configuration

The package can be configured via the usual customize-group RET ormolu mechanism. For example, to enable the TypeApplications extension by default, you can put ("--ghc-opt" "-XTypeApplications") under the "Ormolu Extra Args" option (ormolu-extra-args elisp var).

Notes

This package is just a tiny wrapper on top of the reformatter.el, I mean really tiny, just a few lines of code.

About

A formatter for Haskell source code

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published