DEV Community

Vee Satayamas
Vee Satayamas

Posted on

1

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

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs