about summary refs log tree commit diff
path: root/init.el
diff options
context:
space:
mode:
authorVincent Ambo <vincent@spotify.com>2013-10-17T12·17+0200
committerVincent Ambo <vincent@spotify.com>2013-10-17T12·17+0200
commit2acc9f23fa214d4b661387c17d4c19312eb49c35 (patch)
tree05e5d9b7742d00626220562462905c041e0bf552 /init.el
parentcbecd5031d57528c39b61e16f2aad850f40b49a1 (diff)
Cleanup and evil setup
Removed several functions from init-functions that I didn't
actually use.

Lots of other cleanup.

The variable "is-vim-user" in init.el controls whether or not
evil packages should be installed and configured.
Diffstat (limited to 'init.el')
-rw-r--r--init.el64
1 files changed, 41 insertions, 23 deletions
diff --git a/init.el b/init.el
index 473a7b677789..861f64ce225e 100644
--- a/init.el
+++ b/init.el
@@ -1,3 +1,7 @@
+;; Emacs 24 or higher!
+(when (< emacs-major-version 24)
+  (error "This setup requires Emacs v24, or higher. You have: v%d" emacs-major-version))
+
 ;; Configure package manager
 (require 'package)
 
@@ -6,7 +10,7 @@
 
 ;; ... and melpa. Melpa packages that exist on marmalade will have
 ;; precendence.
-(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
+;(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
 
 (package-initialize)
 
@@ -14,21 +18,16 @@
   (package-refresh-contents))
 
 (defvar my-pkgs
-  '(ac-nrepl
+  '(; Basic functionality
     ace-jump-mode
     browse-kill-ring
-    clojure-mode
-    flycheck
     flx-ido
-    haskell-mode
-    hi2
+    flycheck
     idle-highlight-mode
     ido-ubiquitous
     iy-go-to-char
     magit
-    markdown-mode
     multiple-cursors
-    nrepl
     nyan-mode
     paredit
     projectile
@@ -37,9 +36,26 @@
     smex
     switch-window
     undo-tree
-    yasnippet)
+
+    ; Clojure
+    ac-nrepl
+;    clojure-cheatsheet
+    clojure-mode
+    nrepl
+;    nrepl-eval-sexp-fu
+)
   "A list of packages to install at launch.")
 
+(defvar evil-pkgs
+  '(evil
+    evil-leader
+;    evil-tabs
+    evil-paredit
+    key-chord
+    surround)
+  "Evil related packages"
+)
+
 (dolist (p my-pkgs)
   (when (not (package-installed-p p))
     (package-install p)))
@@ -47,39 +63,41 @@
 ;; Are we on a mac?
 (setq is-mac (equal system-type 'darwin))
 
-(add-to-list 'load-path user-emacs-directory)
-
-(require 'init-functions)
+;; Is this being used by a vim user?
+(setq is-vim-mode t)
 
-(unless (file-exists-p "~/.emacs.d/snippets")
-  (make-directory "~/.emacs.d/snippets"))
+(when is-vim-mode
+  (dolist (p evil-pkgs)
+    (when (not (package-installed-p p))
+      (package-install p))))
 
-(custom-clone-git "http://github.com/swannodette/clojure-snippets"
-                  "snippets/clojure-mode")
+(add-to-list 'load-path user-emacs-directory)
 
-(mapc 'require '(init-settings
+(mapc 'require '(init-functions
+                 init-settings
                  init-modes
                  init-bindings
                  init-eshell))
 
+(when is-vim-mode
+  (require 'init-evil))
+
 (add-to-list 'load-path "~/.emacs.d/scripts/")
 
 (setq custom-file "~/.emacs.d/init-custom.el")
 (load custom-file)
 
-(custom-download-script "https://gist.github.com/gongo/1789605/raw/526e3f21dc7d6cef20951cf0ce5d51b90b7821ff/json-reformat.el"
-                        "json-reformat.el")
+(custom-download-script
+ "https://gist.github.com/gongo/1789605/raw/526e3f21dc7d6cef20951cf0ce5d51b90b7821ff/json-reformat.el"
+ "json-reformat.el")
 
 ;; A file with machine specific settings.
 (load-file-if-exists "~/.emacs.d/init-local.el")
 
-;; IRC configuration (erc)
+;; IRC configuration
 ;; Actual servers and such are loaded from irc.el
 (load-file-if-exists "~/.emacs.d/init-irc.el")
 
-;; Mail configuration (mu4e && mbsync)
-(load-file-if-exists "~/.emacs.d/init-mail.el")
-
 ;; Load magnars' string manipulation library
 (require 's)