 (defun set-exec-path-from-env()
   "Set the 'exec-path' variable to include the $PATH from the shell when in windowed mode."
   (let ((path-from-shell (replace-regexp-in-string
-			  "[ \t\n]*$"
-			  ""
-			  (shell-command-to-string "$SHELL --login -i -c 'echo $PATH'"))))
+						  "[ \t\n]*$"
+						  ""
+						  (shell-command-to-string "$SHELL --login -i -c 'echo $PATH'"))))
     (setenv "PATH" path-from-shell)
     (setq exec-path (split-string path-from-shell path-separator))))
 

  "Make 'ansi-term' better with some custom code."
  (define-key term-raw-map (kbd "s-v") #'ansi-term-paste))

;; Disable bell completely
(setq ring-bell-function 'ignore)
;;; init.el ends here

  :init
  (setq whitespace-line-column 80) ;; Limit line length to 80 chars
  (setq whitespace-style '(face lines-tail trailing)))

;; ------------- Rust -------------

;; Racer
(use-package racer
  :ensure t
  :init
  (add-hook 'racer-mode-hook #'eldoc-mode))

;; Rust Flycheck
(use-package flycheck-rust
  :ensure t
  :init
  (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))

(use-package company-racer
  :ensure t
  :init
  (with-eval-after-load 'company
    (add-to-list 'company-backends 'company-racer)))

(use-package rust-mode
  :ensure t
  :init
  (define-key rust-mode-map (kbd "M-.") #'racer-find-definition)
  (add-hook 'rust-mode-hook #'racer-mode))


;; ----------- Scala --------------

;; Ensime
(use-package ensime
  :ensure t
  :commands ensime ensime-mode)

(add-hook 'scala-mode-hook 'ensime-mode)


;; ---------- Clojure -------------

(use-package clojure-mode
  :ensure t)

(use-package cider
  :ensure t)

;; ---------- Markdown ------------

(use-package markdown-mode
  :ensure t
  :commands (markdown-mode gfm-mode)
  :mode (("\\.md\\'" . gfm-mode)
         ("\\.markdown\\'" . markdown-mode)))

;; --------- Javascript -----------

(defvar js-indent-level)
(setq js-indent-level 4)

;; ----------- YAML ---------------

(use-package yaml-mode
  :ensure t
  :mode (("\\.yml" . yaml-mode))
  :bind ("C-m" . newline-and-indent))

;; -------- Non Use-Package --------

