Closed namedots closed 2 years ago
oh. hold on. cabal-fmt would not receive changes in the buffer like this. that's no good. and it doesn't do expansion when fed content on stdin. and if doing it to a file in a temp path then it doesn't see the project and doesn't know how to expand.
meh.
Sounds good!
@sbdchd nonono hold up :< it really should act on the buffer content, but my change throws that out of the window by instead supplying the file path. no clue how I'm supposed to behave when I find problems after making the pull request. still trying to figure this out.
I give up. I don't see how this could make sense. I'll close this and look for a corner to hide in. Maybe I managed to learn something at least.
disclaimer: idk what I'm doing
my reasoning: I wanted to let cabal-fmt auto-fill a field, but that didn't seem to be working due to current configuration feeding the content to cabal-fmt through stdin, so I wish to change it. By default it seems neoformat uses a temporary path when passing file path by arg. That's also not good enough as cabal-fmt needs access to the project location. I assume that the reason for using a temp path is that some tools make in-place changes. cabal-fmt only does so when asked to with
-i, --in-place
does this break stuff for others?: I wouldn't know.
feel free to discard or whatever. I just made what seemed like an improvement to me, and figured out how to make the pull request.