I downloaded clojure-lsp (https://github.com/snoe/clojure-lsp) and tried to add it as a client in my init.el:

  (use-package lsp-mode
    :ensure t)
  (use-package lsp-ui
    :ensure t
    (add-hook 'lsp-mode-hook #'lsp-ui-mode))
   (lambda () default-directory)

However when I do M-x lsp-mode in a clojure file, I only get this error after a short while:

Error during redisplay: (eval (lsp-mode-line)) signaled (wrong-type-argument lsp--workspace nil)

How do I correctly add clojure-lsp to lsp-mode?

2 Answers 2


It turns out that lsp-mode is currently being reworked. That means that the syntax for registering servers works different now:

 (make-lsp-client :new-connection (lsp-stdio-connection "pyls")
                  :major-modes '(python-mode)
                  :server-id 'pyls))

So you might need to check out the latest README on github for up to date information:



There are now instructions for configuration with emacs lsp-mode. The following is taken from what's currently there. You will need to start by putting the clojure-lsp executable on your path.

(require 'lsp-mode)
 (make-lsp-client :new-connection (lsp-stdio-connection '("bash" "-c" "clojure-lsp"))
                  :major-modes '(clojure-mode clojurec-mode clojurescript-mode)
                  :server-id 'clojure-lsp))
(add-to-list 'lsp-language-id-configuration '(clojure-mode . "clojure-mode"))
(setq lsp-enable-indentation nil)
(add-hook 'clojure-mode-hook #'lsp)
(add-hook 'clojurec-mode-hook #'lsp)
(add-hook 'clojurescript-mode-hook #'lsp)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.