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.
This commit is contained in:
		
							parent
							
								
									cbecd5031d
								
							
						
					
					
						commit
						2acc9f23fa
					
				
					 6 changed files with 72 additions and 138 deletions
				
			
		| 
						 | 
					@ -39,8 +39,8 @@
 | 
				
			||||||
;; So good!
 | 
					;; So good!
 | 
				
			||||||
(global-set-key (kbd "C-c g") 'magit-status)
 | 
					(global-set-key (kbd "C-c g") 'magit-status)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Add a fullscreen toggle
 | 
					;; Add a fullscreen toggle - TODO: reenable in next Emacs release
 | 
				
			||||||
(global-set-key (kbd "M-RET") 'toggle-frame-fullscreen)
 | 
					; (global-set-key (kbd "M-RET") 'toggle-frame-fullscreen)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Replace standard goto-line with goto-line-with-feedback
 | 
					;; Replace standard goto-line with goto-line-with-feedback
 | 
				
			||||||
(global-set-key (kbd "M-g g") 'goto-line-with-feedback)
 | 
					(global-set-key (kbd "M-g g") 'goto-line-with-feedback)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,9 +11,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun eshell-mode-hook-setup ()
 | 
					(defun eshell-mode-hook-setup ()
 | 
				
			||||||
  "Sets up EShell when it is loaded"
 | 
					  "Sets up EShell when it is loaded"
 | 
				
			||||||
 | 
					 | 
				
			||||||
  (setq eshell-path-env (concat
 | 
					  (setq eshell-path-env (concat
 | 
				
			||||||
                         "/Applications/Postgres.app/Contents/MacOS/bin:"
 | 
					 | 
				
			||||||
			 "/usr/local/bin:"
 | 
								 "/usr/local/bin:"
 | 
				
			||||||
			 (concat home-dir "/bin:")
 | 
								 (concat home-dir "/bin:")
 | 
				
			||||||
			 "/usr/local/share/python:"
 | 
								 "/usr/local/share/python:"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@
 | 
				
			||||||
    (unless (file-exists-p file)
 | 
					    (unless (file-exists-p file)
 | 
				
			||||||
      (url-copy-file url file))))
 | 
					      (url-copy-file url file))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 (defun custom-download-script (url filename)
 | 
					(defun custom-download-script (url filename)
 | 
				
			||||||
  "Downloads an Elisp script, places it in ~/.emacs/other and then loads it"
 | 
					  "Downloads an Elisp script, places it in ~/.emacs/other and then loads it"
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  ;; Ensure the directory exists
 | 
					  ;; Ensure the directory exists
 | 
				
			||||||
| 
						 | 
					@ -69,30 +69,6 @@
 | 
				
			||||||
        (call-interactively 'goto-line))
 | 
					        (call-interactively 'goto-line))
 | 
				
			||||||
    (linum-mode -1)))
 | 
					    (linum-mode -1)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun rotate-windows ()
 | 
					 | 
				
			||||||
  "Rotate your windows"
 | 
					 | 
				
			||||||
  (interactive)
 | 
					 | 
				
			||||||
  (cond ((not (> (count-windows)1))
 | 
					 | 
				
			||||||
         (message "You can't rotate a single window!"))
 | 
					 | 
				
			||||||
        (t
 | 
					 | 
				
			||||||
         (setq i 1)
 | 
					 | 
				
			||||||
         (setq numWindows (count-windows))
 | 
					 | 
				
			||||||
         (while  (< i numWindows)
 | 
					 | 
				
			||||||
           (let* (
 | 
					 | 
				
			||||||
                  (w1 (elt (window-list) i))
 | 
					 | 
				
			||||||
                  (w2 (elt (window-list) (+ (% i numWindows) 1)))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                  (b1 (window-buffer w1))
 | 
					 | 
				
			||||||
                  (b2 (window-buffer w2))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                  (s1 (window-start w1))
 | 
					 | 
				
			||||||
                  (s2 (window-start w2))
 | 
					 | 
				
			||||||
                  )
 | 
					 | 
				
			||||||
             (set-window-buffer w1  b2)
 | 
					 | 
				
			||||||
             (set-window-buffer w2 b1)
 | 
					 | 
				
			||||||
             (set-window-start w1 s2)
 | 
					 | 
				
			||||||
             (set-window-start w2 s1)
 | 
					 | 
				
			||||||
             (setq i (1+ i)))))))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun untabify-buffer ()
 | 
					(defun untabify-buffer ()
 | 
				
			||||||
  (interactive)
 | 
					  (interactive)
 | 
				
			||||||
| 
						 | 
					@ -111,22 +87,6 @@ Including indent-buffer, which should not be called automatically on save."
 | 
				
			||||||
  (indent-buffer))
 | 
					  (indent-buffer))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; These come from the emacs starter kit
 | 
					;; These come from the emacs starter kit
 | 
				
			||||||
(defun esk-pretty-lambdas ()
 | 
					 | 
				
			||||||
  (font-lock-add-keywords
 | 
					 | 
				
			||||||
   nil `(("(?\\(lambda\\>\\)"
 | 
					 | 
				
			||||||
          (0 (progn (compose-region (match-beginning 1) (match-end 1)
 | 
					 | 
				
			||||||
                                    ,(make-char 'greek-iso8859-7 107))
 | 
					 | 
				
			||||||
                    nil))))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun esk-eval-and-replace ()
 | 
					 | 
				
			||||||
  "Replace the preceding sexp with its value."
 | 
					 | 
				
			||||||
  (interactive)
 | 
					 | 
				
			||||||
  (backward-kill-sexp)
 | 
					 | 
				
			||||||
  (condition-case nil
 | 
					 | 
				
			||||||
      (prin1 (eval (read (current-kill 0)))
 | 
					 | 
				
			||||||
             (current-buffer))
 | 
					 | 
				
			||||||
    (error (message "Invalid expression")
 | 
					 | 
				
			||||||
           (insert (current-kill 0)))))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun esk-add-watchwords ()
 | 
					(defun esk-add-watchwords ()
 | 
				
			||||||
  (font-lock-add-keywords
 | 
					  (font-lock-add-keywords
 | 
				
			||||||
| 
						 | 
					@ -139,8 +99,4 @@ Including indent-buffer, which should not be called automatically on save."
 | 
				
			||||||
      (find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: ")))
 | 
					      (find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: ")))
 | 
				
			||||||
    (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
 | 
					    (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun speak (m &optional voice)
 | 
					 | 
				
			||||||
  (shell-command (if 'voice (concat "say -v " voice " \"" m "\"")
 | 
					 | 
				
			||||||
                   (concat "say " m))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(provide 'init-functions)
 | 
					(provide 'init-functions)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,9 @@
 | 
				
			||||||
(mapc 'require '(projectile hi2 ac-nrepl yasnippet))
 | 
					(mapc 'require '(projectile hi2 ac-nrepl yasnippet))
 | 
				
			||||||
;; Initializes modes I use.
 | 
					;; Initializes modes I use.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(add-hook 'prog-mode-hook 'esk-pretty-lambdas)
 | 
					 | 
				
			||||||
(add-hook 'prog-mode-hook 'esk-add-watchwords)
 | 
					(add-hook 'prog-mode-hook 'esk-add-watchwords)
 | 
				
			||||||
(add-hook 'prog-mode-hook 'idle-highlight-mode)
 | 
					(add-hook 'prog-mode-hook 'idle-highlight-mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Yasnippet everywhere + activate Clojure snippets!
 | 
					 | 
				
			||||||
(yas-global-mode 1)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Configure markdown-mode
 | 
					;; Configure markdown-mode
 | 
				
			||||||
(autoload 'markdown-mode "markdown-mode"
 | 
					(autoload 'markdown-mode "markdown-mode"
 | 
				
			||||||
  "Major mode for editing Markdown files" t)
 | 
					  "Major mode for editing Markdown files" t)
 | 
				
			||||||
| 
						 | 
					@ -15,14 +11,12 @@
 | 
				
			||||||
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
 | 
					(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
 | 
				
			||||||
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
 | 
					(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Add keybindings to move nested blocks with C-, rsp. C-.
 | 
					 | 
				
			||||||
(define-key haskell-mode-map (kbd "C-,") 'haskell-move-nested-left)
 | 
					 | 
				
			||||||
(define-key haskell-mode-map (kbd "C-.") 'haskell-move-nested-right)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Use auto-complete as completion at point
 | 
					;; Use auto-complete as completion at point
 | 
				
			||||||
(defun set-auto-complete-as-completion-at-point-function ()
 | 
					(defun set-auto-complete-as-completion-at-point-function ()
 | 
				
			||||||
  (setq completion-at-point-functions '(auto-complete)))
 | 
					  (setq completion-at-point-functions '(auto-complete)))
 | 
				
			||||||
(add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point-function)
 | 
					
 | 
				
			||||||
 | 
					(add-hook 'auto-complete-mode-hook
 | 
				
			||||||
 | 
					          'set-auto-complete-as-completion-at-point-function)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Configure nrepl (Clojure REPL) and clojure-mode
 | 
					;; Configure nrepl (Clojure REPL) and clojure-mode
 | 
				
			||||||
| 
						 | 
					@ -30,12 +24,12 @@
 | 
				
			||||||
(defun nrepl-mode-setup ()
 | 
					(defun nrepl-mode-setup ()
 | 
				
			||||||
  "Activates paredit, rainbow delimiters and ac-nrepl"
 | 
					  "Activates paredit, rainbow delimiters and ac-nrepl"
 | 
				
			||||||
  (ac-nrepl-setup)
 | 
					  (ac-nrepl-setup)
 | 
				
			||||||
  (rainbow-delimiters-mode)
 | 
					  (rainbow-delimiters-mode 1)
 | 
				
			||||||
  (paredit-mode))
 | 
					  (paredit-mode 1))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Use ac-nrepl for completion
 | 
					;; Use ac-nrepl for completion
 | 
				
			||||||
(add-hook 'nrepl-mode-hook 'nrepl-mode-setup)
 | 
					(add-hook 'nrepl-mode-hook 'nrepl-mode-setup)
 | 
				
			||||||
(add-hook 'nrepl-interaction-mode-hook 'ac-nrepl-setup)
 | 
					(add-hook 'nrepl-interaction-mode-hook 'nrepl-mode-setup)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; I want history up/down without modifiers
 | 
					;; I want history up/down without modifiers
 | 
				
			||||||
(define-key nrepl-repl-mode-map (kbd "<up>") 'nrepl-backward-input)
 | 
					(define-key nrepl-repl-mode-map (kbd "<up>") 'nrepl-backward-input)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
(require 'uniquify)
 | 
					(require 'uniquify)
 | 
				
			||||||
;; ## Generic settings ##
 | 
					; ## Generic settings ##
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					; Hide those ugly tool bars
 | 
				
			||||||
(tool-bar-mode -1)
 | 
					(tool-bar-mode -1)
 | 
				
			||||||
(scroll-bar-mode -1)
 | 
					(scroll-bar-mode -1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,11 +13,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;;; Code:
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(add-to-list 'exec-path "/usr/local/bin")
 | 
					(add-to-list 'exec-path "/usr/local/bin")
 | 
				
			||||||
(add-to-list 'exec-path (expand-file-name "~/bin"))
 | 
					(add-to-list 'exec-path (expand-file-name "~/bin"))
 | 
				
			||||||
(add-to-list 'exec-path "/Applications/Racket/bin")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(when window-system
 | 
					(when window-system
 | 
				
			||||||
| 
						 | 
					@ -25,6 +23,7 @@
 | 
				
			||||||
  (mouse-wheel-mode t)
 | 
					  (mouse-wheel-mode t)
 | 
				
			||||||
  (blink-cursor-mode -1))
 | 
					  (blink-cursor-mode -1))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					; Fix some defaults
 | 
				
			||||||
(setq visible-bell t
 | 
					(setq visible-bell t
 | 
				
			||||||
      inhibit-startup-message t
 | 
					      inhibit-startup-message t
 | 
				
			||||||
      color-theme-is-global t
 | 
					      color-theme-is-global t
 | 
				
			||||||
| 
						 | 
					@ -75,43 +74,22 @@
 | 
				
			||||||
(prefer-coding-system 'utf-8) ; with sugar on top
 | 
					(prefer-coding-system 'utf-8) ; with sugar on top
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(require 'ffap)
 | 
					(require 'ffap)
 | 
				
			||||||
(defvar ffap-c-commment-regexp "^/\\*+"
 | 
					 | 
				
			||||||
  "Matches an opening C-style comment, like \"/***\".")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defadvice ffap-file-at-point (after avoid-c-comments activate)
 | 
					 | 
				
			||||||
  "Don't return paths like \"/******\" unless they actually exist.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
This fixes the bug where ido would try to suggest a C-style
 | 
					 | 
				
			||||||
comment as a filename."
 | 
					 | 
				
			||||||
  (ignore-errors
 | 
					 | 
				
			||||||
    (when (and ad-return-value
 | 
					 | 
				
			||||||
               (string-match-p ffap-c-commment-regexp
 | 
					 | 
				
			||||||
                               ad-return-value)
 | 
					 | 
				
			||||||
               (not (ffap-file-exists-string ad-return-value)))
 | 
					 | 
				
			||||||
      (setq ad-return-value nil))))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defalias 'yes-or-no-p 'y-or-n-p)
 | 
					(defalias 'yes-or-no-p 'y-or-n-p)
 | 
				
			||||||
(defalias 'auto-tail-revert-mode 'tail-mode)
 | 
					(defalias 'auto-tail-revert-mode 'tail-mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Hippie expand: at times perhaps too hip
 | 
					 | 
				
			||||||
(eval-after-load 'hippie-exp
 | 
					 | 
				
			||||||
  '(progn
 | 
					 | 
				
			||||||
     (dolist (f '(try-expand-line try-expand-list try-complete-file-name-partially))
 | 
					 | 
				
			||||||
       (delete f hippie-expand-try-functions-list))
 | 
					 | 
				
			||||||
     
 | 
					 | 
				
			||||||
     ;; Add this back in at the end of the list.
 | 
					 | 
				
			||||||
     (add-to-list 'hippie-expand-try-functions-list 'try-complete-file-name-partially t)))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; ## Look and feel ##
 | 
					;; ## Look and feel ##
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Themes! I download and install the ones I like and default the one
 | 
					;; Themes! I download and install the ones I like and default the one
 | 
				
			||||||
;; I currently like most. This changes a lot because I hate
 | 
					;; I currently like most. This changes a lot because I hate
 | 
				
			||||||
;; everything. (It's in my nature, don't judge)
 | 
					;; everything. (It's in my nature, don't judge)
 | 
				
			||||||
(custom-download-theme "https://raw.github.com/owainlewis/emacs-color-themes/master/themes/hickey-theme.el"
 | 
					(custom-download-theme
 | 
				
			||||||
                       "hickey-theme.el")
 | 
					 "https://raw.github.com/owainlewis/emacs-color-themes/master/themes/hickey-theme.el"
 | 
				
			||||||
 | 
					 "hickey-theme.el")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(custom-download-theme "https://raw.github.com/rexim/gruber-darker-theme/master/gruber-darker-theme.el"
 | 
					(custom-download-theme
 | 
				
			||||||
                       "gruber-darker-theme.el")
 | 
					 "https://raw.github.com/rexim/gruber-darker-theme/master/gruber-darker-theme.el"
 | 
				
			||||||
 | 
					 "gruber-darker-theme.el")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(load-theme 'gruber-darker t)
 | 
					(load-theme 'gruber-darker t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -126,18 +104,16 @@ comment as a filename."
 | 
				
			||||||
(set-variable 'nyan-wavy-trail t)
 | 
					(set-variable 'nyan-wavy-trail t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Style line numbers (shown with M-g g)
 | 
					;; Style line numbers (shown with M-g g)
 | 
				
			||||||
(setq linum-format (lambda (line)
 | 
					(setq linum-format
 | 
				
			||||||
                     (propertize
 | 
					      (lambda (line)
 | 
				
			||||||
                      (format (concat " %"
 | 
					        (propertize
 | 
				
			||||||
                                      (number-to-string
 | 
					         (format (concat " %"
 | 
				
			||||||
                                       (length (number-to-string
 | 
					                         (number-to-string
 | 
				
			||||||
                                                (line-number-at-pos (point-max)))))
 | 
					                          (length (number-to-string
 | 
				
			||||||
                                      "d ")
 | 
					                                   (line-number-at-pos (point-max)))))
 | 
				
			||||||
                              line)
 | 
					                         "d ")
 | 
				
			||||||
                      'face 'linum)))
 | 
					                 line)
 | 
				
			||||||
 | 
					         'face 'linum)))
 | 
				
			||||||
;; Hiding JOIN, QUIT, PART
 | 
					 | 
				
			||||||
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(eval-after-load 'diff-mode
 | 
					(eval-after-load 'diff-mode
 | 
				
			||||||
  '(progn
 | 
					  '(progn
 | 
				
			||||||
| 
						 | 
					@ -173,9 +149,6 @@ comment as a filename."
 | 
				
			||||||
;; Menu bar doesn't take up additional space, so lets use it.
 | 
					;; Menu bar doesn't take up additional space, so lets use it.
 | 
				
			||||||
(menu-bar-mode 1)
 | 
					(menu-bar-mode 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Don't use Apple's native fullscreen (FIXME: Change with Mavericks)
 | 
					 | 
				
			||||||
(setq ns-use-native-fullscreen nil)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Auto refresh buffers
 | 
					;; Auto refresh buffers
 | 
				
			||||||
(global-auto-revert-mode 1)
 | 
					(global-auto-revert-mode 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -192,11 +165,6 @@ comment as a filename."
 | 
				
			||||||
;; Make emacs behave sanely (overwrite selected text)
 | 
					;; Make emacs behave sanely (overwrite selected text)
 | 
				
			||||||
(delete-selection-mode 1)
 | 
					(delete-selection-mode 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun toggle-native-fullscreen ()
 | 
					 | 
				
			||||||
  "Toggles between native and non-native OS X fullscreen"
 | 
					 | 
				
			||||||
  (interactive)
 | 
					 | 
				
			||||||
  (setq ns-use-native-fullscreen (not ns-use-native-fullscreen)))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; ## Navigation and key bindings ##
 | 
					;; ## Navigation and key bindings ##
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(setq windmove-wrap-around t)
 | 
					(setq windmove-wrap-around t)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										66
									
								
								init.el
									
										
									
									
									
								
							
							
						
						
									
										66
									
								
								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
 | 
					;; Configure package manager
 | 
				
			||||||
(require 'package)
 | 
					(require 'package)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +10,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; ... and melpa. Melpa packages that exist on marmalade will have
 | 
					;; ... and melpa. Melpa packages that exist on marmalade will have
 | 
				
			||||||
;; precendence.
 | 
					;; 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)
 | 
					(package-initialize)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,21 +18,16 @@
 | 
				
			||||||
  (package-refresh-contents))
 | 
					  (package-refresh-contents))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defvar my-pkgs
 | 
					(defvar my-pkgs
 | 
				
			||||||
  '(ac-nrepl
 | 
					  '(; Basic functionality
 | 
				
			||||||
    ace-jump-mode
 | 
					    ace-jump-mode
 | 
				
			||||||
    browse-kill-ring
 | 
					    browse-kill-ring
 | 
				
			||||||
    clojure-mode
 | 
					 | 
				
			||||||
    flycheck
 | 
					 | 
				
			||||||
    flx-ido
 | 
					    flx-ido
 | 
				
			||||||
    haskell-mode
 | 
					    flycheck
 | 
				
			||||||
    hi2
 | 
					 | 
				
			||||||
    idle-highlight-mode
 | 
					    idle-highlight-mode
 | 
				
			||||||
    ido-ubiquitous
 | 
					    ido-ubiquitous
 | 
				
			||||||
    iy-go-to-char
 | 
					    iy-go-to-char
 | 
				
			||||||
    magit
 | 
					    magit
 | 
				
			||||||
    markdown-mode
 | 
					 | 
				
			||||||
    multiple-cursors
 | 
					    multiple-cursors
 | 
				
			||||||
    nrepl
 | 
					 | 
				
			||||||
    nyan-mode
 | 
					    nyan-mode
 | 
				
			||||||
    paredit
 | 
					    paredit
 | 
				
			||||||
    projectile
 | 
					    projectile
 | 
				
			||||||
| 
						 | 
					@ -37,9 +36,26 @@
 | 
				
			||||||
    smex
 | 
					    smex
 | 
				
			||||||
    switch-window
 | 
					    switch-window
 | 
				
			||||||
    undo-tree
 | 
					    undo-tree
 | 
				
			||||||
    yasnippet)
 | 
					
 | 
				
			||||||
 | 
					    ; Clojure
 | 
				
			||||||
 | 
					    ac-nrepl
 | 
				
			||||||
 | 
					;    clojure-cheatsheet
 | 
				
			||||||
 | 
					    clojure-mode
 | 
				
			||||||
 | 
					    nrepl
 | 
				
			||||||
 | 
					;    nrepl-eval-sexp-fu
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
  "A list of packages to install at launch.")
 | 
					  "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)
 | 
					(dolist (p my-pkgs)
 | 
				
			||||||
  (when (not (package-installed-p p))
 | 
					  (when (not (package-installed-p p))
 | 
				
			||||||
    (package-install p)))
 | 
					    (package-install p)))
 | 
				
			||||||
| 
						 | 
					@ -47,39 +63,41 @@
 | 
				
			||||||
;; Are we on a mac?
 | 
					;; Are we on a mac?
 | 
				
			||||||
(setq is-mac (equal system-type 'darwin))
 | 
					(setq is-mac (equal system-type 'darwin))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Is this being used by a vim user?
 | 
				
			||||||
 | 
					(setq is-vim-mode t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(when is-vim-mode
 | 
				
			||||||
 | 
					  (dolist (p evil-pkgs)
 | 
				
			||||||
 | 
					    (when (not (package-installed-p p))
 | 
				
			||||||
 | 
					      (package-install p))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(add-to-list 'load-path user-emacs-directory)
 | 
					(add-to-list 'load-path user-emacs-directory)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(require 'init-functions)
 | 
					(mapc 'require '(init-functions
 | 
				
			||||||
 | 
					                 init-settings
 | 
				
			||||||
(unless (file-exists-p "~/.emacs.d/snippets")
 | 
					 | 
				
			||||||
  (make-directory "~/.emacs.d/snippets"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(custom-clone-git "http://github.com/swannodette/clojure-snippets"
 | 
					 | 
				
			||||||
                  "snippets/clojure-mode")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(mapc 'require '(init-settings
 | 
					 | 
				
			||||||
                 init-modes
 | 
					                 init-modes
 | 
				
			||||||
                 init-bindings
 | 
					                 init-bindings
 | 
				
			||||||
                 init-eshell))
 | 
					                 init-eshell))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(when is-vim-mode
 | 
				
			||||||
 | 
					  (require 'init-evil))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(add-to-list 'load-path "~/.emacs.d/scripts/")
 | 
					(add-to-list 'load-path "~/.emacs.d/scripts/")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(setq custom-file "~/.emacs.d/init-custom.el")
 | 
					(setq custom-file "~/.emacs.d/init-custom.el")
 | 
				
			||||||
(load custom-file)
 | 
					(load custom-file)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(custom-download-script "https://gist.github.com/gongo/1789605/raw/526e3f21dc7d6cef20951cf0ce5d51b90b7821ff/json-reformat.el"
 | 
					(custom-download-script
 | 
				
			||||||
                        "json-reformat.el")
 | 
					 "https://gist.github.com/gongo/1789605/raw/526e3f21dc7d6cef20951cf0ce5d51b90b7821ff/json-reformat.el"
 | 
				
			||||||
 | 
					 "json-reformat.el")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; A file with machine specific settings.
 | 
					;; A file with machine specific settings.
 | 
				
			||||||
(load-file-if-exists "~/.emacs.d/init-local.el")
 | 
					(load-file-if-exists "~/.emacs.d/init-local.el")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; IRC configuration (erc)
 | 
					;; IRC configuration
 | 
				
			||||||
;; Actual servers and such are loaded from irc.el
 | 
					;; Actual servers and such are loaded from irc.el
 | 
				
			||||||
(load-file-if-exists "~/.emacs.d/init-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
 | 
					;; Load magnars' string manipulation library
 | 
				
			||||||
(require 's)
 | 
					(require 's)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue