From 0225d656f369ef66dbd3f12370ed4dae216cfbfc Mon Sep 17 00:00:00 2001 From: John Doty Date: Tue, 3 Jun 2014 07:22:34 -0700 Subject: [PATCH] Clojure! --- .emacs.d/core.el | 41 +++++++++++++++++++++++++++++++++-------- .emacs.d/custom.el | 3 ++- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.emacs.d/core.el b/.emacs.d/core.el index de8a5a3..4433376 100644 --- a/.emacs.d/core.el +++ b/.emacs.d/core.el @@ -65,9 +65,9 @@ (defvar my-packages (list - 'switch-window ; takes over C-x o - 'auto-complete ; complete as you type with overlays - 'zencoding-mode ; http://www.emacswiki.org/emacs/ZenCoding + 'switch-window ; takes over C-x o + 'auto-complete ; complete as you type with overlays + 'zencoding-mode ; http://www.emacswiki.org/emacs/ZenCoding 'ruby-mode ; Major mode for editing Ruby files 'color-theme ; Color themes... 'color-theme-solarized ; ...Solarized @@ -88,7 +88,16 @@ 'tss ; Typescript, ala https://github.com/aki2o/emacs-tss - ;; ----- PROVISIONAL (for whatever that's worth) + ;; Clojure stuffs + 'clojure-mode + 'clojure-test-mode + 'cider + 'cider-decompile + 'cider-tracing + 'ac-nrepl ; Autocomplete for Clojure + + 'paredit ; Also good for lisps? + 'auto-complete-nxml ; Auto-complete for nxml (maybe?) 'magit ; Magit? ) @@ -141,7 +150,7 @@ (if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) (if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) -;; Consolas. +;; Consolas. (And, to a lesser extent, Inconsolata.) ;; (require 'cl) (defun font-existsp (font) @@ -364,7 +373,8 @@ (defun indent-buffer () "Indent the entire current buffer based on the current mode" (interactive) - (indent-region (point-min) (point-max) nil)) + (indent-region (point-min) (point-max)) + (whitespace-cleanup)) (global-set-key (read-kbd-macro "C-c TAB") 'indent-buffer) @@ -561,11 +571,11 @@ (require 'go-mode) (require 'auto-complete-config) -;(require 'go-autocomplete) +(require 'go-autocomplete) (defun my-go-mode-hook () (flycheck-mode) - ;(auto-complete-mode) + (auto-complete-mode) ) (add-hook 'go-mode-hook 'my-go-mode-hook) @@ -595,3 +605,18 @@ ;; ================================================================= (add-to-list 'auto-mode-alist '("\\.appx\\'" . archive-mode)) (add-to-list 'auto-coding-alist '("\\.appx\\'" . no-conversion)) + +;; === +;; Clojure +;; === +(require 'ac-nrepl) +(defun my-cider-mode-hook () + ; (paredit-mode) + (ac-nrepl-setup) + (auto-complete-mode) + (cider-turn-on-eldoc-mode) + ) + +(add-hook 'cider-repl-mode-hook 'my-cider-mode-hook) +(add-hook 'cider-mode-hook 'my-cider-mode-hook) +(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode) diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index 04f2f5e..5371837 100644 --- a/.emacs.d/custom.el +++ b/.emacs.d/custom.el @@ -8,6 +8,7 @@ '(c-indent-level 4) '(c-label-minimum-indentation 0) '(c-label-offset -4) + '(css-indent-offset 2) '(fast-lock-cache-directories (quote ("~/flc-cache"))) '(fast-lock-minimum-size nil) '(fill-column 77) @@ -22,7 +23,7 @@ '(indent-tabs-mode nil) '(inhibit-startup-screen t) '(ispell-program-name "aspell") - '(js2-basic-offset 4) + '(js2-basic-offset 2) '(js2-bounce-indent-p t) '(js2-strict-trailing-comma-warning nil) '(make-backup-files nil)