DEV Community

Discussion on: [Emacs] Auto runs clang-format when file save

Collapse
 
thomas001 profile image
Thomas Weidner

I have the same problem. I solved it by doing

(add-hook 'c-common-mode-hook 
  (lambda ()
    (add-hook (make-local-variable 'before-save-hook)
              'clang-format-buffer)))
Collapse
 
yuu profile image
yuu

thank you both of them.
I will update for article and my init.el