From 5c47cacdbd9204b8c0a2546a054b6f3f37ea851a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 24 Apr 2024 04:01:33 +0530 Subject: (Emacs/lang)-clang-format-mode on cc-mode-hook I can configure projects to use it if necessary. --- Emacs/.config/emacs/lang.org | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org index 594c52e..b1cbcb2 100644 --- a/Emacs/.config/emacs/lang.org +++ b/Emacs/.config/emacs/lang.org @@ -277,9 +277,13 @@ my dotfiles). :after cc-mode :commands (+code/clang-format-region-or-buffer clang-format-mode) - :hook - (c-mode-hook . clang-format-mode) - (c++-mode-hook . clang-format-mode) + ;;; 2024-04-24: disabled as it's annoying on projects where a + ;;; .clang-format isn't defined. Furthermore, does it make sense + ;;; for *every* file you open and edit to have a format function run + ;;; right after? seems a bit slow. + ;; :hook + ;; (c-mode-hook . clang-format-mode) + ;; (c++-mode-hook . clang-format-mode) :general (code-leader :keymaps '(c-mode-map c++-mode-map) -- cgit v1.2.3-13-gbd6f