about summary refs log tree commit diff
path: root/init-modes.el
diff options
context:
space:
mode:
authorVincent Ambo <vincent@spotify.com>2013-10-19T18·04+0200
committerVincent Ambo <vincent@spotify.com>2013-10-19T18·04+0200
commit6aba1cbda92d082f087c5308fb03c678f24f7d14 (patch)
tree201d31de8d77e12c37520fac19bfb4baaabae82a /init-modes.el
parent47f5ddebc0486d8d8c194ae3561d21e6697daf82 (diff)
Fix settings for nrepl.el -> cider
Diffstat (limited to 'init-modes.el')
-rw-r--r--init-modes.el41
1 files changed, 13 insertions, 28 deletions
diff --git a/init-modes.el b/init-modes.el
index 55b25358bfc2..e8283df70401 100644
--- a/init-modes.el
+++ b/init-modes.el
@@ -1,4 +1,4 @@
-(mapc 'require '(projectile hi2 ac-nrepl yasnippet))
+(mapc 'require '(projectile ac-nrepl cider))
 ;; Initializes modes I use.
 
 (add-hook 'prog-mode-hook 'esk-add-watchwords)
@@ -19,45 +19,30 @@
           'set-auto-complete-as-completion-at-point-function)
 
 
-;; Configure nrepl (Clojure REPL) and clojure-mode
+;; Configure CIDER (Clojure REPL) and clojure-mode
 
-(defun nrepl-mode-setup ()
+(defun cider-mode-setup ()
   "Activates paredit, rainbow delimiters and ac-nrepl"
   (ac-nrepl-setup)
-  (rainbow-delimiters-mode 1)
-  (paredit-mode 1))
-
-;; Use ac-nrepl for completion
-(add-hook 'nrepl-mode-hook 'nrepl-mode-setup)
-(add-hook 'nrepl-interaction-mode-hook 'nrepl-mode-setup)
-
-;; 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 "<down>") 'nrepl-forward-input)
-(define-key nrepl-repl-mode-map (kbd "C-<up>") 'previous-line)
-(define-key nrepl-repl-mode-map (kbd "C-<down>") 'next-line)
-(define-key nrepl-repl-mode-map (kbd "C-c C-d") 'ac-nrepl-popup-doc)
-
-(define-key nrepl-interaction-mode-map (kbd "C-c C-d") 'ac-nrepl-popup-doc)
-(define-key nrepl-interaction-mode-map (kbd "C-c D") 'nrepl-doc)
-
+  (clojure-mode))
 
+(add-hook 'cider-repl-mode-hook 'cider-mode-setup)
+(add-hook 'cider-interaction-mode-hook 'cider-mode-setup)
 (eval-after-load "auto-complete"
-   '(add-to-list 'ac-modes 'nrepl-mode))
+  '(add-to-list 'ac-modes 'cider-repl-mode))
 
 ;; Paredit in clojure
 (add-hook 'clojure-mode-hook 'paredit-mode)
 
 ;; eldoc in clojure
-(add-hook 'nrepl-interaction-mode-hook
-          'nrepl-turn-on-eldoc-mode)
-
-(add-hook 'nrepl-interaction-mode-hook
-          'paredit-mode)
+(add-hook 'cider-interaction-mode-hook
+          'cider-turn-on-eldoc-mode)
 
 ;; Don't annoy me
-(setq nrepl-hide-special-buffers t)
-(setq nrepl-popup-stacktraces nil)
+(setq cider-hide-special-buffers t)
+(setq cider-popup-stacktraces nil)
+; (setq cider-repl-pop-to-buffer-on-connect nil)
+(setq cider-repl-popup-stacktraces t)
 
 ;; Enable projectile for all things programming
 (add-hook 'prog-mode-hook 'projectile-on)