Open Dushistov opened 6 years ago
This doesn't directly address your request but I use this, which achieves that effect:
:hook ((c-mode-common . (lambda ()
(add-hook 'before-save-hook 'clang-format-buffer nil t)))
Note that this used within the context of use-package
, so you should change the syntax accordingly if not using use-package
.
It would be to have option with name like
clang-format-enable-format-on-save
, that use can enable and code in buffer will reformatted during saving on disk process.