Emacs: Format C++ code with clang-format before saving.
This commit is contained in:
parent
c9eb9776b5
commit
bbcaeaf792
|
@ -1,6 +1,6 @@
|
|||
;;; c++.el --- C++ settings. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-06-01T17:55:46+0200>
|
||||
;; Time-stamp: <2020-06-15T21:30:37+0200>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -126,7 +126,10 @@
|
|||
)
|
||||
|
||||
(when (executable-find "clang-format")
|
||||
(use-package clang-format))
|
||||
(use-package clang-format
|
||||
:hook ((c-mode-common
|
||||
. (lambda ()
|
||||
(add-hook 'before-save-hook #'clang-format-buffer nil t))))))
|
||||
|
||||
(provide 'programming/c++)
|
||||
;;; c++.el ends here
|
||||
|
|
Loading…
Reference in New Issue