 ;;
 ;; User key bindings
 ;;
-
-;; Toggle evil-mode on/off
-(global-set-key (kbd "C-x e") 'evil-mode)
-
-;;
-;; Strange custom variable land
-;;
-
-(custom-set-variables
- '(elpy-modules
-   (quote
-    (elpy-module-company elpy-module-eldoc elpy-module-pyvenv elpy-module-yasnippet elpy-module-sane-defaults))))
-(custom-set-faces
- )


;; Set emacs environment based on GUI or terminal use
(defun setup-gui-env()
  (load-theme 'solarized-dark t)
  (scroll-bar-mode -1)
  (tool-bar-mode -1))


;; Simple emacs config
;;

;;
;; Package Management
;;

(require 'package)

(setq
 package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
		    ("org" . "http://orgmode.org/elpa/")
                    ("melpa" . "http://melpa.org/packages/")
                    ("melpa-stable" . "http://stable.melpa.org/packages/"))
 package-archive-priorities '(("melpa-stable" . 1)))

;; Activate installed packages
(package-initialize)

;; Make sure to have downloaded archive description.
(when (not package-archive-contents)
  (package-refresh-contents)
  (package-install 'use-package))
(require 'use-package)

;;
;; User Package Management
;;

(use-package exec-path-from-shell
  :ensure t
  :if window-system
  :config
  (exec-path-from-shell-initialize))

(use-package evil
  :ensure t
  :bind ("C-x e" . evil-mode))

(use-package php-mode
  :ensure t
  :mode "\\.php\\'"
  :interpreter "php")

(use-package scala-mode
  :ensure t
  :mode "\\.scala\\'"
  :interpreter "scala")

(use-package ensime
  :ensure t
  :pin melpa-stable)

(use-package helm
  :ensure t
  :config
  (helm-mode 1))

(use-package helm-projectile
  :ensure t
  :config
  (projectile-global-mode)
  (helm-projectile-on))

(use-package which-key
  :ensure t
  :config
  (which-key-mode t)
  (which-key-setup-side-window-bottom))

(use-package sublime-themes
  :ensure t
  :demand)

;;
;; User Environment Settings
