You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to run the formatter without triggering automatic code folding? Presumably this happens because I have vim setup to fold code when opening a C++ file and :ClangFormatreopens the file after it has done its thing. It would be great if vim-clang-format had some way to disable this so as to avoid having to drill down through a bunch of folds.
The text was updated successfully, but these errors were encountered:
I noticed that it's hard to maintain folding between the before and the after of formatting. For example, when a formatter found unnecessary { ... } block (e.g. body of if statement), it would remove the block. Removing block means the change of folding level. We can't detect it from Vim and vim-clang-format can't know which fold level it should open.
However, closing all folds after formatting is annoying as you pointed. I think I can try to implement some heuristics to reduce the problem, although it's not perfect.
Is there a way to run the formatter without triggering automatic code folding? Presumably this happens because I have vim setup to fold code when opening a C++ file and
:ClangFormat
reopens the file after it has done its thing. It would be great if vim-clang-format had some way to disable this so as to avoid having to drill down through a bunch of folds.The text was updated successfully, but these errors were encountered: