1

Add clj-refactor and flycheck-clj-kondo packages

This commit is contained in:
Jessie Hildebrandt 2023-03-16 11:40:27 -04:00
parent 2509a0c5b6
commit 237ed62ce3

29
init.el
View File

@ -980,6 +980,24 @@ DOCSTRING is an optional form that is discarded upon expansion."
(< (point) cider-repl-input-start-mark)) (< (point) cider-repl-input-start-mark))
(cider-repl--grab-old-input nil)))))) (cider-repl--grab-old-input nil))))))
;; ---------------------------------- ;;
;; clj-refactor
;; ---------------------------------- ;;
(external-package clj-refactor
"Provides a suite of powerful refactoring functions for Clojure projects."
:custom
(cljr-warn-on-eval nil "Disables warning prompts for refactor commands that build ASTs.")
:hook
(cider-mode-hook . (lambda ()
(clj-refactor-mode)
(advice-remove 'cider-format-buffer #'cljr-clean-ns)
(advice-add 'cider-format-buffer :before #'cljr-clean-ns)))
:bind
(:map clj-refactor-map
("C-c ." . cljr-find-usages)
("M-s M-r ." . cljr-rename-symbol)))
;; ---------------------------------- ;; ;; ---------------------------------- ;;
;; consult ;; consult
;; ---------------------------------- ;; ;; ---------------------------------- ;;
@ -1095,6 +1113,17 @@ DOCSTRING is an optional form that is discarded upon expansion."
:bind :bind
("C-c e" . flycheck-list-errors)) ("C-c e" . flycheck-list-errors))
;; ---------------------------------- ;;
;; flycheck-clj-kondo
;; ---------------------------------- ;;
(external-package flycheck-clj-kondo
"Integrates clj-kondo as a flycheck checker for Clojure buffers."
:when
(executable-find "clj-kondo")
:hook
(clojure-mode-hook . (lambda () (require 'flycheck-clj-kondo))))
;; ---------------------------------- ;; ;; ---------------------------------- ;;
;; fussy ;; fussy
;; ---------------------------------- ;; ;; ---------------------------------- ;;