Split function definition into more lines
This commit is contained in:
parent
7a9dc1209c
commit
70d411a4c8
14
config.org
14
config.org
|
@ -2014,15 +2014,19 @@ When I do have a project open, Treemacs is flexible and allows you to open direc
|
|||
(interactive)
|
||||
(require 'treemacs)
|
||||
(let* ((name (concat "Perspective " (doom-project-name)))
|
||||
(project (treemacs-project->create! :name (doom-project-name) :path (directory-file-name (doom-project-root))
|
||||
:path-status 'local-readable :is-disabled? nil))
|
||||
(workspace (treemacs-workspace->create! :name name :projects (list project) :is-disabled? nil)))
|
||||
(project (treemacs-project->create!
|
||||
:name (doom-project-name)
|
||||
:path (directory-file-name (doom-project-root))
|
||||
:path-status 'local-readable :is-disabled? nil))
|
||||
(workspace (treemacs-workspace->create!
|
||||
:name name :projects (list project) :is-disabled? nil)))
|
||||
;; Only rebuild workspace if it doesn't have the structure we expect
|
||||
(unless (equal (treemacs-current-workspace) workspace)
|
||||
(setq treemacs--workspaces
|
||||
(append (remove-if (lambda (w) (string= (treemacs-workspace->name w) name))
|
||||
(append (remove-if (lambda (w)
|
||||
(string= (treemacs-workspace->name w) name)
|
||||
treemacs--workspaces)
|
||||
(list workspace)))
|
||||
(list workspace))))
|
||||
(treemacs-do-switch-workspace workspace)
|
||||
(treemacs--invalidate-buffer-project-cache)
|
||||
(treemacs--rerender-after-workspace-change))))
|
||||
|
|
Loading…
Reference in a new issue