blob: 5e8e4ff93bef9c8083bc8a25b26a9845be26ddf5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
;;; init-clojure.el --- Clojure Configuration File -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;(require 'init-lisp)
(use-package yasnippet
:diminish yas-minor-mode)
(use-package flycheck-clj-kondo)
(use-package clojure-mode
:config
(require 'flycheck-clj-kondo)
(subword-mode +1))
(use-package hydra)
(use-package clj-refactor
:diminish
:after yasnippet
:bind ("C-c '" . hydra-cljr-help-menu/body)
:config
(cljr-add-keybindings-with-prefix "C-c C-m")
(setq cljr-suppress-no-project-warning t)
(defun clj-refactor-hook-fn ()
(clj-refactor-mode 1)
(yas-minor-mode 1))
:hook
(clojure-mode . clj-refactor-hook-fn))
(use-package cider
:diminish
:config
(defun cider-repl-mode-hook-fn ()
(display-line-numbers-mode -1)
(subword-mode +1))
(setq cider-repl-pop-to-buffer-on-connect 'display-only
cider-repl-display-help-banner nil
cider-repl-history-highlight-current-entry t
cider-repl-history-highlight-inserted-item t
cider-repl-use-clojure-font-lock t
cider-repl-use-pretty-printing t
cider-save-file-on-load t
;; cider-invert-insert-eval-p t
;; cider-switch-to-repl-on-insert nil
cider-repl-history-file ".cider-repl-history"
nrepl-log-messages t
clojure-toplevel-inside-comment-form t)
(unbind-key "C-c C-l" cider-mode-map)
:bind
(:map cider-mode-map ("C-c M-l" . cider-load-file))
(:map clojure-mode-map ("C-x p q" . project-clojure-test-switch))
:hook
(cider-repl-mode . cider-repl-mode-hook-fn)
(cider-mode . eldoc-mode))
(use-package nix-sandbox
:config
(defun nix-shell-lein-command ()
(when (file-exists-p (expand-file-name "shell.nix" (project-root (project-current))))
(setq-local cider-lein-command (nix-executable-find (nix-current-sandbox) "lein"))))
:hook
(cider-mode . nix-shell-lein-command))
(provide 'init-clojure)
;;; init-clojure.el ends here
|