             "/usr/include/sword"))
     (setq company-c-headers-path-system my-header-paths))
 
-  ;; Set up rtags
-  (use-package rtags
-    :config
-    ;; Start rtags upon entering a C/C++ file
-    (add-hook
-     'c-mode-common-hook
-     (lambda () (if (not (is-current-file-tramp))
-                    (rtags-start-process-unless-running))))
-    (add-hook
-     'c++-mode-common-hook
-     (lambda () (if (not (is-current-file-tramp))
-                    (rtags-start-process-unless-running))))
-    ;; Flycheck setup
-    (require 'flycheck-rtags)
-    (defun my-flycheck-rtags-setup ()
-      (flycheck-select-checker 'rtags)
-      ;; RTags creates more accurate overlays.
-      (setq-local flycheck-highlighting-mode nil)
-      (setq-local flycheck-check-syntax-automatically nil))
-    ;; c-mode-common-hook is also called by c++-mode
-    (add-hook 'c-mode-common-hook #'my-flycheck-rtags-setup)
-    :init
-    (require 'rtags)
-    (rtags-restart-process)
-    (rtags-diagnostics)
-    (rtags-enable-standard-keybindings c-mode-base-map "\C-cr"))
-
   ;; Cling the C++ REPL
   (use-package cling
     :init

    (require 'flymake-google-cpplint)
    (flymake-google-cpplint-load))

  (use-package google-c-style
    :init
    (add-hook 'c-mode-common-hook 'google-set-c-style)
    (add-hook 'c-mode-common-hook 'google-make-newline-indent))

  ;; setup GDB
  (setq

    (cmake-ide-run-cmake)
    (cmake-ide-compile))

  (defun my/c-common-hooks ()
    ;;(setq ac-sources (append '(ac-source-semantic) ac-sources))
    (linum-mode 1)
    (local-set-key [f5] #'proper-cmake-compile)
    (local-set-key [f6] #'gdb)
    (local-unset-key [67108910])
    (local-unset-key [67108908])
    (local-set-key [67108910] ;; Bind key C-.
                   (quote rtags-find-symbol-at-point))
    (local-set-key [67108908] ;; Bind key C-,
                   (quote helm-gtags-find-rtag))
    (rtags-start-process-unless-running)
    (my-flycheck-rtags-setup)
    (google-set-c-style)
    (google-make-newline-indent)
    (my-programming-hooks)
    (my/company-c-header-init)
    (my/flymake-google-init)
    (irony-mode)
    (rtags-start-process-unless-running))

  (add-hook 'c-mode-hook
            '(lambda ()
               (my/c-common-hooks)))
  (add-hook 'c++-mode-hook
            '(lambda ()
               (my/c-common-hooks)))
  (add-hook 'objc-mode-hook
            '(lambda ()
               (my/c-common-hooks)))
  )
(provide 'c-init)
