2018-06-15 03:10:55 +02:00
|
|
|
;;; ui/treemacs/autoload.el -*- lexical-binding: t; -*-
|
|
|
|
|
2018-08-29 02:04:12 +02:00
|
|
|
;;;###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)
|
2020-05-03 16:30:52 -04:00
|
|
|
(require 'treemacs)
|
2018-08-29 02:04:12 +02:00
|
|
|
(pcase (treemacs-current-visibility)
|
|
|
|
(`visible (delete-window (treemacs-get-local-window)))
|
2020-05-03 13:21:51 -04:00
|
|
|
(_ (if (doom-project-p)
|
|
|
|
(treemacs-add-and-display-current-project)
|
|
|
|
(treemacs)))))
|