Fmt updates document without saving the current version

When running Fmt command, the file is not being saved before formatting,
just the window content is being replaced. Errors show in a tooltip.
Automatically format document on save