Merge pull request #2819 from jsravn/enable-treemacs-persp-support
Enable treemacs workspace/persp support
This commit is contained in:
commit
568a871ec7
3 changed files with 11 additions and 2 deletions
|
@ -6,8 +6,9 @@
|
||||||
(cl-letf (((symbol-function 'treemacs-workspace->is-empty?)
|
(cl-letf (((symbol-function 'treemacs-workspace->is-empty?)
|
||||||
(symbol-function 'ignore)))
|
(symbol-function 'ignore)))
|
||||||
(treemacs--init))
|
(treemacs--init))
|
||||||
(dolist (project (treemacs-workspace->projects (treemacs-current-workspace)))
|
(unless (bound-and-true-p persp-mode)
|
||||||
(treemacs-do-remove-project-from-workspace project))
|
(dolist (project (treemacs-workspace->projects (treemacs-current-workspace)))
|
||||||
|
(treemacs-do-remove-project-from-workspace project)))
|
||||||
(with-current-buffer origin-buffer
|
(with-current-buffer origin-buffer
|
||||||
(let ((project-root (or (doom-project-root) default-directory)))
|
(let ((project-root (or (doom-project-root) default-directory)))
|
||||||
(treemacs-do-add-project-to-workspace
|
(treemacs-do-add-project-to-workspace
|
||||||
|
|
|
@ -66,3 +66,9 @@ This must be set before `treemacs' has loaded.")
|
||||||
(use-package! treemacs-magit
|
(use-package! treemacs-magit
|
||||||
:when (featurep! :tools magit)
|
:when (featurep! :tools magit)
|
||||||
:after treemacs magit)
|
:after treemacs magit)
|
||||||
|
|
||||||
|
|
||||||
|
(use-package! treemacs-persp
|
||||||
|
:when (featurep! :ui workspaces)
|
||||||
|
:after treemacs
|
||||||
|
:config (treemacs-set-scope-type 'Perspectives))
|
||||||
|
|
|
@ -7,3 +7,5 @@
|
||||||
(package! treemacs-projectile)
|
(package! treemacs-projectile)
|
||||||
(when (featurep! :tools magit)
|
(when (featurep! :tools magit)
|
||||||
(package! treemacs-magit))
|
(package! treemacs-magit))
|
||||||
|
(when (featurep! :ui workspaces)
|
||||||
|
(package! treemacs-persp))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue