; Activate cargo minor-mode on rust-mode start
(add-hook 'rust-mode-hook 'cargo-minor-mode)

;; Activate racer on rust-mode start
(add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'racer-mode-hook #'eldoc-mode)

;; Code completion
(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)
