Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using fourmolu #6

Open
xave opened this issue May 24, 2023 · 3 comments
Open

Error when using fourmolu #6

xave opened this issue May 24, 2023 · 3 comments
Assignees

Comments

@xave
Copy link

xave commented May 24, 2023

Error

Error detected while processing BufWrite Autocommands for "*.hs"..function vim_fourmolu#FourmoluWriteRun[15]
..BufWrite Autocommands for "*.hs"..function vim_fourmolu#FourmoluWriteRun[9]
..vim_fourmolu#FourmoluFmt: .........

Line 16
General Problem

Setup

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jan 01 1980 00:00:00)
macOS version - arm64

vimrc has:

let g:fourmolu_write = 1

fourmolu is in the $PATH and functions properly when called.

Expected Behavior: Format on save.
Actual behavior: Errors only

@feature-not-a-bug
Copy link
Owner

The General Problem line seems to be emitted by fourmolu so it's being invoked. Can you try running vim with logging to see if there's any problems in the execution? And what happens if you call FourmoluFmt manually?

vim -Vvimlog.txt vimtest.hs against the test code from https://fourmolu.github.io/ would be a good baseline.

@feature-not-a-bug feature-not-a-bug self-assigned this May 24, 2023
@xave
Copy link
Author

xave commented May 27, 2023

I'll try that.

@xave
Copy link
Author

xave commented May 31, 2023

Steps:
create /tmp/vimTest.hs with test code as mentioned

vimrc:

let g:fourmolu_write = 1
let g:fourmolu_executable = "fourmolu"

fourmolu executable is on $PATH

Result:

same error as initially presented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants