Merge da48b5181f
into 8c5e0ef3b6
commit
5c5121ac9d
18
README.md
18
README.md
|
@ -111,6 +111,24 @@ log the size of the input, but _not_ the full input/output of requests.)
|
|||
brittany built in.
|
||||
#### Atom
|
||||
[Atom Beautify](https://atom.io/packages/atom-beautify) supports brittany as a formatter for Haskell. Since the default formatter is set to hindent, you will need to change this setting to brittany, after installing the extension.
|
||||
#### Emacs
|
||||
The following is an easy way to use `brittany` in Emacs
|
||||
```
|
||||
(defun brittany-format-buffer-file ()
|
||||
"run brittany command on the current file and revert the buffer"
|
||||
(interactive)
|
||||
(save-buffer)
|
||||
(shell-command
|
||||
(format "brittany %s --write-mode=inplace"
|
||||
(shell-quote-argument (buffer-file-name)))
|
||||
nil
|
||||
shell-command-default-error-buffer)
|
||||
(revert-buffer t t t))
|
||||
|
||||
(add-hook 'haskell-mode-hook
|
||||
(lambda ()
|
||||
(local-set-key (kbd "C-c C-f") 'brittany-format-buffer-file)))
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
|
|
Loading…
Reference in New Issue