feature/workspaces: create new workspace when switching to new projectile project
This commit is contained in:
parent
752e8e4fe4
commit
cb4b61b1ac
1 changed files with 7 additions and 4 deletions
|
@ -42,10 +42,13 @@
|
|||
(advice-add 'display-buffer :after '+workspaces*auto-add-buffer)
|
||||
|
||||
;; TODO Integration with projectile?
|
||||
;; ;; Create a new workspace on project switch
|
||||
;; (defun doom|new-workspace-on-project-change ()
|
||||
;; (+workspace-new (f-filename (doom-project-root))))
|
||||
;; (add-hook 'projectile-before-switch-project-hook 'doom|new-workspace-on-project-change)
|
||||
;; Create a new workspace on project switch
|
||||
(defun doom|new-workspace-on-project-change ()
|
||||
(let ((project-name (projectile-project-name)))
|
||||
(if (+workspace-exists-p project-name)
|
||||
(+workspace/switch-to project-name)
|
||||
(+workspace/new project-name))))
|
||||
(add-hook 'projectile-before-switch-project-hook 'doom|new-workspace-on-project-change)
|
||||
|
||||
;; TODO Test per-frame perspectives
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue