Refactor out -pcase in +treemacs/toggle
This commit is contained in:
parent
dd71f54e5e
commit
4213899b01
1 changed files with 5 additions and 5 deletions
|
@ -10,13 +10,13 @@
|
|||
project to add."
|
||||
(interactive)
|
||||
(require 'treemacs)
|
||||
(-pcase (treemacs--current-visibility)
|
||||
['visible (delete-window (treemacs--is-visible?))]
|
||||
['exists (treemacs-select-window)]
|
||||
['none
|
||||
(pcase (treemacs--current-visibility)
|
||||
(`visible (delete-window (treemacs--is-visible?)))
|
||||
(`exists (treemacs-select-window))
|
||||
(`none
|
||||
(let ((project-root (doom-project-root 'nocache)))
|
||||
(when project-root
|
||||
(unless (treemacs--find-project-for-path project-root)
|
||||
(treemacs-add-project-at (treemacs--canonical-path project-root)
|
||||
(doom-project-name 'nocache))))
|
||||
(treemacs--init project-root))]))
|
||||
(treemacs--init project-root)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue