vim-ormolu icon indicating copy to clipboard operation
vim-ormolu copied to clipboard

Missing `--stdin-input-file` option when using recent Ormolu versions

Open NicolasT opened this issue 3 years ago • 1 comments

I've always used vim-ormolu with Ormolu 0.1.4.1, which worked fine. However, since I check Ormolu formatting of projects in CI, and some more recent version of Ormolu has a different opinion on some layout rules, I need to upgrade.

When running with 0.5.3.0, vim-ormolu fails, since it looks like Ormolu now wants some more info when running with stdin input: :messages shows

The --stdin-input-file option is necessary when using input from stdin and accounting for .cabal files

I tried looking into the source-code of this plugin to figure out how to fix this, but at this point I did find where to add which code, but not which code exactly (i.e., how to know the filename of the current buffer), so I'm stuck :smiley:

NicolasT avatar Jan 29 '23 20:01 NicolasT

i write let g:ormolu_options=["--no-cabal"], and helped me get around the error.

stepa1000 avatar Feb 27 '23 12:02 stepa1000