mirror of
https://github.com/dense-analysis/ale
synced 2024-12-18 20:35:29 +00:00
b496c4b164
This commit adds a fixer for the Haskell language, ormolu (https://github.com/tweag/ormolu). Signed-off-by: David Wood <david@davidtw.co>
25 lines
576 B
Plaintext
25 lines
576 B
Plaintext
Before:
|
|
Save g:ale_haskell_ormolu_executable
|
|
Save g:ale_haskell_ormolu_options
|
|
|
|
After:
|
|
Restore
|
|
|
|
Execute(The ormolu callback should return the correct default values):
|
|
AssertEqual
|
|
\ {
|
|
\ 'command': ale#Escape('ormolu')
|
|
\ },
|
|
\ ale#fixers#ormolu#Fix(bufnr(''))
|
|
|
|
Execute(The ormolu executable and options should be configurable):
|
|
let g:ale_nix_nixpkgsfmt_executable = '/path/to/ormolu'
|
|
let g:ale_nix_nixpkgsfmt_options = '-h'
|
|
|
|
AssertEqual
|
|
\ {
|
|
\ 'command': ale#Escape('/path/to/ormolu')
|
|
\ . ' -h',
|
|
\ },
|
|
\ ale#fixers#nixpkgsfmt#Fix(bufnr(''))
|