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-02-09 11:12:51 +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
|
2014-02-25 17:12:53 +01:00
|
|
|
confluence
|
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
|
2014-06-15 12:22:18 +02:00
|
|
|
mvn
|
2013-08-06 23:46:26 +02:00
|
|
|
nyan-mode
|
2013-07-29 00:53:08 +02:00
|
|
|
paredit
|
2014-06-15 12:22:18 +02:00
|
|
|
password-store
|
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
|
2014-06-15 12:22:18 +02:00
|
|
|
rust-mode
|
2014-02-25 17:12:53 +01:00
|
|
|
s
|
2013-07-29 00:53:08 +02:00
|
|
|
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
|
2014-02-25 17:12:53 +01:00
|
|
|
ac-cider-compliment
|
2013-10-19 19:34:30 +02:00
|
|
|
cider
|
2013-10-17 14:17:38 +02:00
|
|
|
clojure-mode
|
|
|
|
)
|
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
|
|
|
|
2014-02-04 23:48:29 +01:00
|
|
|
;; What's the home folder?
|
|
|
|
(defvar home-dir)
|
|
|
|
(setq home-dir (expand-file-name "~"))
|
|
|
|
|
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
|
|
|
|
2014-10-21 19:37:19 +02:00
|
|
|
(mapc 'require '(functions
|
|
|
|
settings
|
|
|
|
modes
|
|
|
|
bindings
|
|
|
|
eshell-setup))
|
2013-07-08 01:15:05 +02:00
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
(when is-vim-mode
|
|
|
|
(require 'init-evil))
|
|
|
|
|
2014-10-21 19:37:19 +02:00
|
|
|
(setq custom-file (concat user-emacs-directory "init/custom.el"))
|
2013-07-08 01:15:05 +02:00
|
|
|
(load custom-file)
|
|
|
|
|
2013-08-05 15:34:46 +02:00
|
|
|
;; A file with machine specific settings.
|
2014-02-04 23:48:29 +01:00
|
|
|
;(load-file-if-exists (concat home-dir "/.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
|
2014-02-04 23:48:29 +01:00
|
|
|
; (load-file-if-exists (concat home-dir "/.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)
|
|
|
|
|
2014-02-25 17:12:53 +01:00
|
|
|
(require 'ack-and-a-half)
|
|
|
|
|
2013-07-08 01:15:05 +02:00
|
|
|
;; Seed RNG
|
|
|
|
(random t)
|
|
|
|
|
2014-06-15 12:22:18 +02:00
|
|
|
;; SML should respect theme colours
|
2014-10-21 19:11:09 +02:00
|
|
|
; (setq sml/theme 'black)
|
2014-06-15 12:22:18 +02:00
|
|
|
(sml/setup)
|