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.
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.