Format unfolds folds
Hi there! It seems that when a formatter is run, it unfolds any blocks that exist.

vs what vim-autoformat does

I'd be happy to write a PR for this, just curious as to where you think this would be happening?
It seems that winsaveview() does not save fold information.
This is useful if you have a mapping that jumps around in the
buffer and you want to go back to the original view.
This does not save fold information
Do you think it is worth creating a PR for this? Looks like mkview could be an alternative.
I am experiencing the same. :( Unfortunately I do not know enough VimScript, Otherwise I would try a PR.
I know this issue is old, but for me the code below works well. It is a tad slow though, so I'm not sure if including it in the Neoformat function is a good option.
command! -range=% Fmt :mkview | :<line1>,<line2>Neoformat | :loadview
Is anyone willing to give my PR a try? https://github.com/sbdchd/neoformat/pull/323
Even though this fixes the problems that I was facing, the vim-go folks seem to have dealt with a similar problem in a different way (one that involves :mkview and :loadview like @Alfaix mentioned); should we implement something similar here? Unfortunately I am not able to reproduce the problem (one that requires the use of :mkview/:loadview to fix it), but if someone come up with a small test case, I am happy to update the PR accordingly.