Function: cider-xref-tree--implements-op-plan

cider-xref-tree--implements-op-plan is a byte-compiled function defined in cider-xref-tree.el.

Signature

(cider-xref-tree--implements-op-plan VAR)

Documentation

Build an implementations plan for VAR via the cider/who-implements op.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-xref-tree.el
(defun cider-xref-tree--implements-op-plan (var)
  "Build an implementations plan for VAR via the `cider/who-implements' op."
  (let* ((result (cider-sync-request:who-implements (cider-current-ns) var))
         (kind (and result (nrepl-dict-get result "kind"))))
    (pcase kind
      ('nil (list :kind nil))
      ("protocol"
       (list :kind "protocol"
             :title (format "Implementations of %s" var)
             :empty-noun "implementations"
             :nodes (mapcar #'cider-xref-tree--impl-node
                            (nrepl-dict-get result "impls"))))
      ("multimethod"
       (list :kind "multimethod"
             :title (format "Methods of %s" var)
             :empty-noun "dispatch values"
             :nodes (cider-xref-tree--multimethod-nodes
                     var (nrepl-dict-get result "dispatch-values"))))
      (_ (list :kind "other")))))