doomemacs/modules/ui/treemacs/autoload.el

17 lines
493 B
EmacsLisp
Raw Normal View History

2018-06-15 03:10:55 +02:00
;;; 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)))))