From 237ed62ce3a9dc63531d1318522f6694eb1a7e25 Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Thu, 16 Mar 2023 11:40:27 -0400 Subject: [PATCH] Add clj-refactor and flycheck-clj-kondo packages --- init.el | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/init.el b/init.el index 96a448f..d517d46 100644 --- a/init.el +++ b/init.el @@ -980,6 +980,24 @@ DOCSTRING is an optional form that is discarded upon expansion." (< (point) cider-repl-input-start-mark)) (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 ;; ---------------------------------- ;; @@ -1095,6 +1113,17 @@ DOCSTRING is an optional form that is discarded upon expansion." :bind ("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 ;; ---------------------------------- ;;