Remove flycheck-clojure setup call and old clj format function

This commit is contained in:
Jeremy Dormitzer 2020-06-14 12:27:06 -04:00
parent f6670386e9
commit 76af63ad85

View File

@ -3256,7 +3256,6 @@ Sprinkle in some CIDER:
'(("local" "localhost" "4005"))
cider-prompt-for-symbol nil)
(general-def cider-mode-map "C-c t" cider-test-commands-map)
(flycheck-clojure-setup)
(add-hook 'cider-repl-mode-hook 'smartparens-strict-mode)
:hook ((clojure-mode . cider-mode)
(clojurescript-mode . cider-mode)
@ -3291,35 +3290,6 @@ Clj-refactor adds magical refactoring abilities:
:hook ((clojure-mode . clj-refactor-setup)))
#+END_SRC
Integrate with cljfmt, the Clojure code formatter:
#+BEGIN_SRC emacs-lisp
(defun cljfmt ()
(interactive)
(let* ((start (if (use-region-p) (region-beginning) (point-min)))
(end (if (use-region-p) (region-end) (point-max)))
(text (buffer-substring start end))
(file (make-temp-file "cljfmt"))
(fmted
(with-temp-buffer
(insert text)
(write-file file)
(shell-command
(concat
"clojure "
"-Sdeps "
"'{:aliases {:fmt {:extra-deps {cljfmt {:mvn/version \"0.6.4\"}} :main-opts [\"-m\" \"cljfmt.main\"]}}}' "
"-A:fmt "
"fix "
file))
(revert-buffer nil t)
(buffer-substring (point-min) (point-max)))))
(delete-region start end)
(goto-char start)
(insert fmted)))
(general-def clojure-mode-map "C-M-\\" #'cljfmt)
#+END_SRC
Add support for running Org-mode Clojure source blocks with [[https://github.com/borkdude/babashka][Babashka]]:
#+BEGIN_SRC emacs-lisp
(with-eval-after-load 'ob-clojure