Fork me on GitHub
David Pham07:01:36

Is there a way to use CLJ-Kondo and Cider to automatically remove unused dependencies in a namespace?


Clj refactor.el has that feature


An update to my effort to make cider and clj-suitable work ( I believe that clj-suitable dot completion (`(.| js/console)`) does not work with cider REPL because context does not work due to:

(defun cider-completion-get-context ()
  "Extract context depending on `cider-completion-use-context' and major mode."
  (let ((context (if (and cider-completion-use-context
                          ;; Important because `beginning-of-defun' and
                          ;; `ending-of-defun' work incorrectly in the REPL
                          ;; buffer, so context extraction fails there.
                          (derived-mode-p 'clojure-mode))
                     ;; We use ignore-errors here since grabbing the context
                     ;; might fail because of unbalanced parens, or other
                     ;; technical reasons, yet we don't want to lose all
                     ;; completions and throw error to user because of that.
                     (or (ignore-errors (cider-completion-get-context-at-point))
    (if (string= cider-completion-last-context context)
      (setq cider-completion-last-context context)
( It works perfectly from within a cljs buffer. @robertkrahn