about summary refs log tree commit diff stats
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-clojure.el17
1 files changed, 16 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-clojure.el b/.emacs.d/lisp/init-clojure.el
index 6162709..a684a97 100644
--- a/.emacs.d/lisp/init-clojure.el
+++ b/.emacs.d/lisp/init-clojure.el
@@ -12,7 +12,22 @@
 (use-package clojure-mode
   :config
   (require 'flycheck-clj-kondo)
-  (subword-mode +1))
+  (subword-mode +1)
+
+  ;; https://github.com/weavejester/compojure/wiki/Emacs-indentation
+  (define-clojure-indent
+    (defroutes 'defun)
+    (GET 2)
+    (POST 2)
+    (PUT 2)
+    (DELETE 2)
+    (HEAD 2)
+    (ANY 2)
+    (OPTIONS 2)
+    (PATCH 2)
+    (rfn 2)
+    (let-routes 1)
+    (context 2)))
 
 (use-package hydra)
 (use-package clj-refactor