Skip to content

Instantly share code, notes, and snippets.

@ramirez7
Created November 7, 2018 22:12
Show Gist options
  • Select an option

  • Save ramirez7/5caf2d62fd7ef066b5656783979721d5 to your computer and use it in GitHub Desktop.

Select an option

Save ramirez7/5caf2d62fd7ef066b5656783979721d5 to your computer and use it in GitHub Desktop.
;; I put this in my .emacs
(require 'haskell-commands)
(defun my-auto-format ()
(interactive)
;; see https://github.com/haskell/haskell-mode/blob/dd0ea640fa449d021399a17db65e4d50d3f0f2a9/haskell-commands.el#L811
(haskell-mode-buffer-apply-command "brittany"))
;; The args to call-process-region within haskell-mode-buffer-apply-command are hard-coded to nil,
;; so it looks like there's no way to use --indent=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment