From c852c7531c87b24f5f5fbad21bec66b2ca015ab1 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Fri, 25 Sep 2020 01:14:55 -0700 Subject: [PATCH] C stuff --- dotfiles/emacs.d/init.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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