Skip to content

Instantly share code, notes, and snippets.

@psyllo
Created December 6, 2013 17:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psyllo/7829242 to your computer and use it in GitHub Desktop.
Save psyllo/7829242 to your computer and use it in GitHub Desktop.
dot-emacs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(custom-enabled-themes (quote (wombat)))
'(global-whitespace-mode t)
'(indent-tabs-mode nil)
'(inhibit-startup-screen t)
'(initial-scratch-message nil)
'(make-backup-files nil)
'(menu-bar-mode nil)
'(scroll-bar-mode nil)
'(show-paren-mode t)
'(tool-bar-mode nil)
'(whitespace-style (quote (face tabs trailing lines-tail space-before-tab empty space-after-tab tab-mark))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(magit-diff-add ((t (:inherit diff-added :background "color-34"))))
'(magit-diff-del ((t (:inherit diff-removed :background "color-52"))))
'(magit-item-highlight ((t (:inherit secondary-selection :background "color-234")))))
;;;; Initial `package' setup
;; We want to initialize packages early in this configuration so we
;; can use and tweak them.
;;; `load-path'
(add-to-list 'load-path "~/.emacs.d/elisp") ; Elisp files that need a home
(add-to-list 'load-path "~/proj/benfu.el")
;;; `package' initialization
(when (require 'package nil t)
;; (add-to-list 'package-archives
;; '("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize))
;;; `benfu' bootstrap
;; Some personal, hopefully portable, elisp in a minor mode.
(when (require 'benfu nil t)
(setq benfu-mode t))
;;; Done with initial packages and dependecy bootstrapping
;;;;
;;;
;; `paredit'
(when (require 'paredit nil t)
;; Don't activate paredit on a more general mode like prog-mode
;; because paredit isn't compatible with every programming language
;; such as bash, which has caused me problems in the past.
(add-hook 'clojure-mode 'paredit-mode))
;;;
;; `cider' (used to be nrepl)
(when (boundp 'paredit-mode)
(add-hook 'nrepl-mode-hook 'paredit-mode))
(when (boundp 'cider-mode-hook)
(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
(setq cider-popup-stacktraces nil))
;;;
;; Auto complete
(when (require 'auto-complete-config nil t)
(ac-config-default)
(define-key ac-completing-map "\M-/" 'ac-stop)) ; use M-/ to stop completion
;;;
;; `ac-nrepl' with `cider'
(when (require 'ac-nrepl nil t)
(add-hook 'cider-repl-mode-hook 'ac-nrepl-setup)
(add-hook 'cider-mode-hook 'ac-nrepl-setup)
(eval-after-load "auto-complete"
'(add-to-list 'ac-modes 'cider-repl-mode))
(eval-after-load "cider"
'(define-key cider-mode-map (kbd "C-c C-d") 'ac-nrepl-popup-doc)))
;;; `project-mode'
(when (require 'project-mode nil t)
(when (require 'clojure-project-mode nil t)
(add-hook 'clojure-mode-hook 'clojure-project-mode))
(project-load-all))
;;;
;; Sonian related
(if (> emacs-major-version 22)
(condition-case nil
(require 'sonian)
(error (warn "Loading Sonian code failed - continuing anyway")))
(warn "Sonian elisp requires a newer Emacs than %d" emacs-major-version))
;;; .emacs ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment