Closed kozross closed 4 years ago
I was having the same issue (except I haven't tried ormolu
versions prior to 0.0.5.0) and managed to solve it with the following config:
let g:neoformat_haskell_ormolu = { 'exe': 'ormolu', 'args': [] }
let g:neoformat_enabled_haskell = ['ormolu']
Hope it helps!
The -p
flag added here doesn't seem to exist anymore (I'm not familiar with older versions of ormolu, just getting it set up):
https://github.com/sbdchd/neoformat/blob/master/autoload/neoformat/formatters/haskell.vim#L58
Neoformat: ormolu -p 2> /var/folders/m6/fbrn9lkj3bzb7hng9t7q810m0000gn/T/neoformat/stderr.log
Neoformat: using stdin
Neoformat: []
Neoformat: [0]
Neoformat: 1
Neoformat: stderr output redirected to file/var/folders/m6/fbrn9lkj3bzb7hng9t7q810m0000gn/T/neoformat/stderr.log
Neoformat: ['Invalid option `-p''', '', 'Usage: ormolu [-v|--version] [--manual-exts] [-i | (-m|--mode MODE)] ', ' [-o|--ghc-opt OPT] [-u|--unsafe] [-d|--debug] ', ' [-c|--che
ck-idempotence] [--start-line START] [--end-line END] ', ' [FILE]']
Neoformat: 1
Neoformat: trying next formatter
"Lib.hs" 13L, 150C written```
When I try
Neoformat ormolu
, I get the message that ormolu failed to run. When I run ormolu manually from the command-line, this works without issue.This didn't show up until I tried the latest ormolu (version 0.0.5.0) - on all previous versions, this worked fine.