 ;; rtags setup ;;
 ;;;;;;;;;;;;;;;;;
 
-(require 'rtags)
-(require 'company)
-(require 'flycheck-rtags)
-
-(condition-case nil ; The following commands will fail if rtags is not installed.
+(if (executable-find "rc")
+  (condition-case nil ; The following commands will fail if rtags is not installed.
     (progn
+      (require 'rtags)
+      (require 'company)
+      (require 'flycheck-rtags)
+
       (setq rtags-autostart-diagnostics t)
       (rtags-diagnostics)
       (setq rtags-completions-enabled t)

;; Dylan stuff ;;
;;;;;;;;;;;;;;;;;

(condition-case nil
    (progn
      (add-to-list 'load-path "~/.emacs.d/dylan-mode")
      (require 'dime))
  (error "Failed to load DIME"))

;;;;;;;;;;;;;;;;;;
;; Rust support ;;

;;(setenv "PYTHONHOME" "~/.elpy-libraries/easy_install")

(elpy-enable)
;; (pyvenv-activate "~/.elpy-virtualenv")

;;;;;;;;;;;;;;;
;; Lua stuff ;;
