Fork me on GitHub
#cider
<
2020-01-29
>
David Pham07:01:36

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

dominicm07:01:11

Clj refactor.el has that feature

dmegas16:01:25

An update to my effort to make cider and clj-suitable work ( https://clojurians-log.clojureverse.org/cider/2020-01-20). 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))
                         "nil")
                   "nil")))
    (if (string= cider-completion-last-context context)
        ":same"
      (setq cider-completion-last-context context)
      context)))
(https://github.com/clojure-emacs/cider/blob/master/cider-completion.el#L128). It works perfectly from within a cljs buffer. @robertkrahn