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