         (define-key-multimap maps (kbd "M-p") 'rtags-previous-match)
         (define-key-multimap maps (kbd "M-f") 'rtags-location-stack-forward)
         (define-key-multimap maps (kbd "M-b") 'rtags-location-stack-back)
-        (define-key-multimap maps (kbd "M-SPC") (function company-complete)))) ; Force company completion with M-space
-  (error (message "rtags could not be initialized."))))
+        (define-key-multimap maps (kbd "M-SPC") (function company-complete))   ; Force company completion with M-space
+        (define-key-multimap maps (kbd "M-SPC") (function company-complete))))
+  (error (message "rtags could not be initialized.")))
 
 (global-company-mode)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; rust setup using racer ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(setq racer-rust-src-path "~/Documents/rust-src/src/")
+(add-hook 'rust-mode-hook #'racer-mode)
+(add-hook 'racer-mode-hook #'eldoc-mode)
+(add-hook 'racer-mode-hook #'company-mode)
+
+(require 'rust-mode)
+(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
+(setq company-tooltip-align-annotations t)
+
+(setq company-idle-delay .3)
+(setq company-minimum-prefix-length 2)
 
 ;;;;;;;;;;;;;;;;;;;;;;
 ;; MELPA over HTTPS ;;

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

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

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

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

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

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