 (require 'dumb-jump)
 (setq dumb-jump-selector 'helm)
 
-(quelpa '(lua-mode :fetcher github :repo "velkyel/lua-mode"))
+;; (quelpa '(lua-mode :fetcher github :repo "velkyel/lua-mode"))
 (require 'lua-mode)
 (define-key lua-mode-map (kbd "M-.") 'dumb-jump-go)
 (define-key lua-mode-map (kbd "M-,") 'dumb-jump-back)
 
-(require 'rtags)
-(setq rtags-display-result-backend 'helm)
-(setq rtags-imenu-syntax-highlighting t)
+(when use-rtags
+  (require 'rtags)
+  (setq rtags-display-result-backend 'helm)
+  (setq rtags-imenu-syntax-highlighting t))
 
 (defun my-imenu ()
   (interactive)
-  (if (rtags-is-indexed)
+  (if (and use-rtags (rtags-is-indexed))
       (rtags-imenu)
     (helm-imenu-in-all-buffers)))    ;; semantic-or-imenu nil
 


(defun my-c-mode-common-hook ()
  (setq-local fill-column 90)
  (add-to-list 'company-backends 'company-rtags)
  ;; (setq rtags-show-containing-function t)
  ;; (setq-local eldoc-documentation-function #'rtags-eldoc-function)
  ;; (eldoc-mode 1)

  (define-key c-mode-base-map (kbd "M-.") 'my-goto-symbol)
  (define-key c-mode-base-map (kbd "M-,") 'pop-tag-mark)
  (define-key c-mode-base-map (kbd "C-M-\\") 'clang-format-region)
  (when use-rtags (define-key c-mode-base-map (kbd "M-?") 'rtags-display-summary))
  (define-key c-mode-base-map (kbd "C-i") 'clang-format)
  (define-key c-mode-base-map (kbd "C-.") 'my-imenu)
  (define-key c-mode-base-map (kbd "M-o") 'cff-find-other-file))
