2013-10-17 14:17:38 +02:00
|
|
|
;; Emacs 24 or higher!
|
|
|
|
(when (< emacs-major-version 24)
|
|
|
|
(error "This setup requires Emacs v24, or higher. You have: v%d" emacs-major-version))
|
|
|
|
|
2013-07-08 01:15:05 +02:00
|
|
|
;; Configure package manager
|
|
|
|
(require 'package)
|
|
|
|
|
|
|
|
;; Add Marmalade repo
|
|
|
|
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
|
|
|
|
|
|
|
|
;; ... and melpa. Melpa packages that exist on marmalade will have
|
|
|
|
;; precendence.
|
2013-10-17 14:22:50 +02:00
|
|
|
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
|
2013-07-08 01:15:05 +02:00
|
|
|
|
2014-01-07 14:54:32 +01:00
|
|
|
;; And load things!
|
2014-01-30 14:26:52 +01:00
|
|
|
;; (package-refresh-contents)
|
2013-07-08 01:15:05 +02:00
|
|
|
(package-initialize)
|
|
|
|
|
2013-07-29 00:53:08 +02:00
|
|
|
(defvar my-pkgs
|
2013-10-17 14:17:38 +02:00
|
|
|
'(; Basic functionality
|
2013-08-19 00:46:54 +02:00
|
|
|
ace-jump-mode
|
2014-01-30 14:26:52 +01:00
|
|
|
ack-and-a-half
|
2013-07-29 00:53:08 +02:00
|
|
|
browse-kill-ring
|
2013-10-19 20:04:45 +02:00
|
|
|
dash
|
2013-08-03 15:36:05 +02:00
|
|
|
flx-ido
|
2013-10-17 14:17:38 +02:00
|
|
|
flycheck
|
2013-07-29 00:53:08 +02:00
|
|
|
idle-highlight-mode
|
|
|
|
ido-ubiquitous
|
2013-08-06 23:46:26 +02:00
|
|
|
iy-go-to-char
|
2013-07-29 00:53:08 +02:00
|
|
|
magit
|
2013-07-30 16:19:58 +02:00
|
|
|
multiple-cursors
|
2013-08-06 23:46:26 +02:00
|
|
|
nyan-mode
|
2013-07-29 00:53:08 +02:00
|
|
|
paredit
|
2013-10-19 19:31:35 +02:00
|
|
|
project-explorer
|
2013-07-29 00:53:08 +02:00
|
|
|
projectile
|
2013-10-21 13:28:13 +02:00
|
|
|
puppet-mode
|
2013-07-29 00:53:08 +02:00
|
|
|
rainbow-delimiters
|
|
|
|
rainbow-mode
|
|
|
|
smex
|
2013-10-19 22:44:30 +02:00
|
|
|
smart-mode-line
|
2013-08-06 23:46:26 +02:00
|
|
|
switch-window
|
2013-10-14 08:50:56 +02:00
|
|
|
undo-tree
|
2013-10-17 14:17:38 +02:00
|
|
|
|
|
|
|
; Clojure
|
|
|
|
ac-nrepl
|
2013-10-19 19:34:30 +02:00
|
|
|
clojure-cheatsheet
|
|
|
|
cider
|
2013-10-17 14:17:38 +02:00
|
|
|
clojure-mode
|
|
|
|
; nrepl-eval-sexp-fu
|
|
|
|
)
|
2013-07-08 01:15:05 +02:00
|
|
|
"A list of packages to install at launch.")
|
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
(defvar evil-pkgs
|
|
|
|
'(evil
|
|
|
|
evil-leader
|
2013-10-21 13:28:13 +02:00
|
|
|
evil-tabs
|
2013-10-17 14:17:38 +02:00
|
|
|
evil-paredit
|
|
|
|
key-chord
|
|
|
|
surround)
|
2014-01-07 14:54:32 +01:00
|
|
|
"Evil related packages")
|
2013-10-17 14:17:38 +02:00
|
|
|
|
2013-07-08 01:15:05 +02:00
|
|
|
(dolist (p my-pkgs)
|
|
|
|
(when (not (package-installed-p p))
|
|
|
|
(package-install p)))
|
|
|
|
|
2013-08-07 00:49:20 +02:00
|
|
|
;; Are we on a mac?
|
|
|
|
(setq is-mac (equal system-type 'darwin))
|
2013-07-08 01:15:05 +02:00
|
|
|
|
2014-01-30 14:26:52 +01:00
|
|
|
;; Or on Linux?
|
|
|
|
(setq is-linux (equal system-type 'gnu/linux))
|
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
;; Is this being used by a vim user?
|
2013-10-19 19:31:35 +02:00
|
|
|
(setq is-vim-mode nil)
|
2013-10-14 08:50:56 +02:00
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
(when is-vim-mode
|
|
|
|
(dolist (p evil-pkgs)
|
|
|
|
(when (not (package-installed-p p))
|
|
|
|
(package-install p))))
|
2013-10-14 08:50:56 +02:00
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
(add-to-list 'load-path user-emacs-directory)
|
2013-10-14 08:50:56 +02:00
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
(mapc 'require '(init-functions
|
|
|
|
init-settings
|
2013-08-07 00:49:20 +02:00
|
|
|
init-modes
|
|
|
|
init-bindings
|
|
|
|
init-eshell))
|
2013-07-08 01:15:05 +02:00
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
(when is-vim-mode
|
|
|
|
(require 'init-evil))
|
|
|
|
|
2013-07-19 13:57:13 +02:00
|
|
|
(add-to-list 'load-path "~/.emacs.d/scripts/")
|
|
|
|
|
2013-07-08 01:15:05 +02:00
|
|
|
(setq custom-file "~/.emacs.d/init-custom.el")
|
|
|
|
(load custom-file)
|
|
|
|
|
2013-08-05 15:34:46 +02:00
|
|
|
;; A file with machine specific settings.
|
|
|
|
(load-file-if-exists "~/.emacs.d/init-local.el")
|
2013-07-25 20:22:57 +02:00
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
;; IRC configuration
|
2013-07-08 01:15:05 +02:00
|
|
|
;; Actual servers and such are loaded from irc.el
|
2013-08-05 15:37:43 +02:00
|
|
|
(load-file-if-exists "~/.emacs.d/init-irc.el")
|
2013-07-08 01:15:05 +02:00
|
|
|
|
2013-08-05 11:54:38 +02:00
|
|
|
;; Load magnars' string manipulation library
|
|
|
|
(require 's)
|
|
|
|
|
2013-07-08 01:15:05 +02:00
|
|
|
;; Seed RNG
|
|
|
|
(random t)
|
|
|
|
|
|
|
|
;; Start server for emacsclient
|
|
|
|
(server-start)
|