diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index f16faeb..5f9d8d6 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -173,9 +173,6 @@ There are two things you can do about this warning: (add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) (add-hook 'scheme-mode-hook #'enable-paredit-mode) -(add-hook 'c-mode-hook 'counsel-gtags-mode) -(add-hook 'c++-mode-hook 'counsel-gtags-mode) - (require 'rainbow-delimiters) (add-hook 'clojure-mode-hook 'rainbow-delimiters-mode) @@ -306,7 +303,14 @@ There are two things you can do about this warning: ;;;;;;;;;;; C/C++ (use-package clang-format+) +(use-package counsel-gtags) + (add-hook 'c-mode-common-hook #'clang-format+-mode) +(add-hook 'c-mode-hook 'counsel-gtags-mode) +(add-hook 'c++-mode-hook 'counsel-gtags-mode) + +;; 4 space offset for c +(setq-default c-basic-offset 4) ;;-------------------------------------------------------------------------------------- ;; Save hooks