Open xeechou opened 1 year ago
it is not possible since
format-all-region
modifies the entire buffer anyway.
It should not modify the entire buffer. That sounds like a bug. Which formatter did you test it with?
it is not possible since
format-all-region
modifies the entire buffer anyway.It should not modify the entire buffer. That sounds like a bug. Which formatter did you test it with?
I don't meant it changed actual "content" of the entire buffer. If you turned on highlight-changes-mode and run a format-all-région you will see. I am using clang-format
Hi, it is nice to have
format-all-region
that only format one region of the buffer. However I am not sure how useful it is. I tried to archive formatting only the modified regions (as it is already available feature in vscode, neovim, etc) for large code base with legacy code.I try to implement this feature with
(after-change-functions)
hook andformat-all-region
but it is not possible sinceformat-all-region
modifies the entire buffer anyway.I am wondering how we can archive the similar feature as in https://github.com/microsoft/vscode/pull/104994 ?