Created
May 25, 2015 11:26
-
-
Save claj/9e41c487e98b82151870 to your computer and use it in GitHub Desktop.
emacs clojure toolbox setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; put this in ~/.emacs.d/init.el : | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) | |
(package-initialize) | |
(unless (package-installed-p 'clojure-mode) | |
(package-install 'clojure-mode)) | |
(unless (package-installed-p 'cider) | |
(package-install 'cider)) | |
(unless (package-installed-p 'cider-eval-sexp-fu) | |
(package-install 'cider-eval-sexp-fu)) | |
(unless (package-installed-p 'clj-refactor) | |
(package-install 'clj-refactor)) | |
(require 'clojure-mode) | |
(require 'cider) | |
(require 'clj-refactor) | |
(require 'company) ;; auto completes | |
(global-company-mode) | |
(setq cider-repl-wrap-history t) | |
(setq cider-repl-pretty-printing t) | |
(setq cider-repl-history-size 100000) | |
(setq cider-repl-history-file "~/.replhistory") | |
(add-hook 'clojure-mode-hook 'paredit-mode) | |
(add-hook 'cider-mode-hook #'eldoc-mode) | |
;; clj-refactor recommends: | |
(add-hook 'clojure-mode-hook (lambda () (yas/minor-mode 1))) | |
(add-hook 'clojure-mode-hook (lambda () | |
(clj-refactor-mode 1) | |
(cljr-add-keybindings-with-prefix "C-S-M-x"))) | |
(add-hook 'cider-repl-mode-hook #'paredit-mode) | |
;;from naked emacs blog post | |
(blink-cursor-mode 0) | |
(setq initial-scratch-message "") | |
(setq inhibit-startup-message t) | |
(setq inhibit-startup-echo-area-message "linus") | |
(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. | |
'(custom-enabled-themes (quote (tango-dark))) | |
'(custom-safe-themes (quote ("bad832ac33fcbce342b4d69431e7393701f0823a3820f6030ccc361edd2a4be4" "21d9280256d9d3cf79cbcf62c3e7f3f243209e6251b215aede5026e0c5ad853f" default))) | |
'(menu-bar-mode nil) | |
'(scroll-bar-mode nil) | |
'(show-paren-mode t) | |
'(tool-bar-mode nil)) | |
(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. | |
'(default ((t (:family "DejaVu Sans Mono" :foundry "unknown" :slant normal :weight normal :height 180 :width normal))))) | |
;; get rid of .somefile~ and other trash in your repo folders. | |
(setq | |
backup-by-copying t ; don't clobber symlinks | |
backup-directory-alist | |
'(("." . "~/.saves")) ; don't litter my fs tree | |
delete-old-versions t | |
kept-new-versions 6 | |
kept-old-versions 2 | |
version-control t) ; use versioned backups | |
;; Unbind Pesky Sleep Button | |
(global-unset-key [(control z)]) | |
(global-unset-key [(control x)(control z)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment