This redesigns how format-all applies changes. Before, it would erase
the buffer and insert the formatted result. This would throw markers out
of whack, and usually meant the cursor would end up somewhere else (e.g.
the beginning of the file).
Now, changes are made to the buffer line by line, via RCS patch.
Other changes:
+ +format-region function was removed (replaced by +format-buffer and
+format/region).
+ set-formatter! was moved to autoload/settings.el
+ New +format/buffer command to replace format-all-buffer
This is much too unpredictable, considering the variable nature of elisp
indentation, and the possibility that certain functions and their indent
behavior may not be defined/declared when the file is being formatted.
Also renames +format|on-save to +format|buffer for clarity. It should
not (normally) be used directly. Use `+format|enable-on-save-maybe` and
`+format|enable-on-save`.
+ Fixes function/command formatters (like #'gofmt)
+ Fixes formatting by region
+ Adds default keybindings:
+ gQ evil operator
+ SPC c f (normal mode) to format buffer
+ SPC c f (visual mode) to format selection
Centralized code formatting with built-in support for a variety of
languages. Provides the set-formatter! function for defining your own.
Still experimental and needs more testing!