DEV Community

Vee Satayamas
Vee Satayamas

Posted on

Configuring Emacs, Clojure, and cljKondo in one minute

Given you have Emacs 29.1 and JDK on your GNU/Linux.

Install Clojure

wget https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh -O install_clojure.sh && \
  chmod 755 install_clojure.sh && \
  su -c ./install_clojure.sh
Enter fullscreen mode Exit fullscreen mode

Install cljKondo

wget https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo -O install-clj-kondo.sh && \
  chmod 755 install-clj-kondo.sh && \
  su -c ./install-clj-kondo.sh
Enter fullscreen mode Exit fullscreen mode

Put this in your .emacs file

(setq warning-minimum-level :emergency)
(setq package-archives '(("elpa" . "https://elpa.gnu.org/packages/")
                         ("melpa" . "https://melpa.org/packages/")))
(use-package flycheck
  :config
  (add-hook 'after-init-hook #'global-flycheck-mode))

(use-package flycheck-clj-kondo
  :ensure t)

(use-package clojure-mode
  :ensure t
  :config
  (require 'flycheck-clj-kondo))

(use-package paredit :ensure t
  :config
  (add-hook 'clojure-mode-hook          #'enable-paredit-mode)
  (add-hook 'edn-hook                   #'enable-paredit-mode))
Enter fullscreen mode Exit fullscreen mode

Top comments (0)