Alexander-Miller/treemacs@10c96c9 -> Alexander-Miller/treemacs@5c01829 The new treemacs-add-and-display-current-project command does what the old +treemacs/toggle did, now we just need +treemacs/toggle to do-what-I-mean with respect to projects (if not in a project, treemacs-add-and-display-current-project unhelpfully aborts with an error).
16 lines
493 B
EmacsLisp
16 lines
493 B
EmacsLisp
;;; ui/treemacs/autoload.el -*- lexical-binding: t; -*-
|
|
|
|
;;;###autoload
|
|
(defun +treemacs/toggle ()
|
|
"Initialize or toggle treemacs.
|
|
|
|
Ensures that only the current project is present and all other projects have
|
|
been removed.
|
|
|
|
Use `treemacs' command for old functionality."
|
|
(interactive)
|
|
(pcase (treemacs-current-visibility)
|
|
(`visible (delete-window (treemacs-get-local-window)))
|
|
(_ (if (doom-project-p)
|
|
(treemacs-add-and-display-current-project)
|
|
(treemacs)))))
|