fix(workspaces): remove ivy integration
Due to upstream changes in ivy-rich, +workspace/switch-to throws a `wrong-type-argument listp leaf` error. As I plan to phase out Ivy support (and the Ivy module) in the long term, I'll simply remove ivy (and ivy-rich) integration in the workspaces module, rather than update it. Fix: #7499 Fix: #7173
This commit is contained in:
parent
286be1b249
commit
90070c639a
3 changed files with 1 additions and 30 deletions
|
@ -1,17 +0,0 @@
|
|||
;;; ui/workspaces/autoload/ivy.el -*- lexical-binding: t; -*-
|
||||
;;;###if (modulep! :completion ivy)
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace--ivy-rich-preview (workspace)
|
||||
(if-let (buffers (when-let (workspace (gethash workspace *persp-hash*))
|
||||
(cl-loop for (type . rest) in (persp-window-conf workspace)
|
||||
if (eq type 'buffer)
|
||||
collect (car leaf)
|
||||
else if (eq type 'leaf)
|
||||
append (cl-loop for (type . leaf) in rest
|
||||
if (eq type 'buffer)
|
||||
collect (car leaf)))))
|
||||
(string-join buffers " ")
|
||||
"*No buffers*"))
|
||||
|
||||
;;; ivy.el ends here
|
|
@ -318,12 +318,7 @@ workspace, otherwise the new workspace is blank."
|
|||
end of the workspace list."
|
||||
(interactive
|
||||
(list (or current-prefix-arg
|
||||
(if (modulep! :completion ivy)
|
||||
(ivy-read "Switch to workspace: "
|
||||
(+workspace-list-names)
|
||||
:caller #'+workspace/switch-to
|
||||
:preselect (+workspace-current-name))
|
||||
(completing-read "Switch to workspace: " (+workspace-list-names))))))
|
||||
(completing-read "Switch to workspace: " (+workspace-list-names)))))
|
||||
(when (and (stringp index)
|
||||
(string-match-p "^[0-9]+$" index))
|
||||
(setq index (string-to-number index)))
|
||||
|
|
|
@ -206,13 +206,6 @@ stored in `persp-save-dir'.")
|
|||
("xt" counsel-projectile-switch-project-action-run-term "invoke term from project root")
|
||||
("X" counsel-projectile-switch-project-action-org-capture "org-capture into project")))
|
||||
|
||||
(when (modulep! :completion ivy)
|
||||
(after! ivy-rich
|
||||
(cl-callf plist-put ivy-rich-display-transformers-list
|
||||
'+workspace/switch-to
|
||||
'(:columns ((ivy-rich-candidate (:width 50))
|
||||
(+workspace--ivy-rich-preview))))))
|
||||
|
||||
(when (modulep! :completion helm)
|
||||
(after! helm-projectile
|
||||
(setcar helm-source-projectile-projects-actions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue