   (global-set-key (kbd "C-c u") 'clang-format-buffer)
   :config
   (setq clang-format-style-option "file")
-  ;; Stop aggressive-indent mode to use clang-format
-  (add-to-list 'aggressive-indent-excluded-modes 'c++-mode)
-  (add-to-list 'aggressive-indent-excluded-modes 'c-mode)
-  (add-to-list 'aggressive-indent-excluded-modes 'cmake-project-mode)
+  (fset 'c-indent-region 'clang-format-region)
   )
 
 (use-package cmake-mode

  )

(use-package company-ycmd
  :config
  (company-ycmd-setup)
  )


;; https://github.com/Valloric/ycmd
;; Install ymcd by installing build.py, do "python build.py -h" for help
;; Set Environment variable YMCD to the root folder of the repo
(use-package ycmd
  :init
  (add-hook 'c++-mode-hook 'ycmd-mode)
