zig-mode icon indicating copy to clipboard operation
zig-mode copied to clipboard

Restore minor-mode-list across revert-buffer Calls in zig-format-buffer

Open bgluzman opened this issue 3 years ago • 0 comments

zig-format-buffer calls revert-buffer which ends up terminating minor modes like lsp. By saving the minor-mode-list context and then restoring it after the revert-buffer call (along with setting the PRESERVE-MODES parameter to true within the call), we are able to retain the minor modes (like lsp) across calls to zig-format-buffer.

I believe this addresses the issue pointed out in #49. This approach was inspired by this Github comment.

bgluzman avatar Aug 16 '22 00:08 bgluzman