|
130 | 130 | &optional buffer-name right-click-actions _clear-cache?) |
131 | 131 | (let ((buffer (get-buffer-create (or buffer-name "*LSP Lookup*")))) |
132 | 132 | (with-current-buffer buffer |
133 | | - (treemacs-initialize 'lsp-treemacs-generic-root |
134 | | - (lsp-treemacs--set-mode-line-format buffer title) |
135 | | - (setq-local face-remapping-alist '((button . default))) |
136 | | - (setq-local lsp-treemacs-tree tree) |
137 | | - (setq-local treemacs-default-visit-action 'treemacs-RET-action) |
138 | | - (setq-local lsp-treemacs--right-click-actions right-click-actions) |
139 | | - (setq-local window-size-fixed nil) |
140 | | - (setq-local treemacs--width-is-locked nil) |
141 | | - (setq-local treemacs-space-between-root-nodes nil) |
142 | | - (when treemacs-text-scale |
143 | | - (text-scale-increase treemacs-text-scale)) |
144 | | - (lsp-treemacs-generic-mode t) |
145 | | - ;; (when expand-depth (lsp-treemacs--expand 'lsp-treemacs-generic-root expand-depth)) |
146 | | - ) |
| 133 | + (treemacs-initialize lsp-treemacs-generic-root |
| 134 | + :with-expand-depth (or expand-depth 0) |
| 135 | + :and-do (progn |
| 136 | + (lsp-treemacs--set-mode-line-format buffer title) |
| 137 | + (setq-local face-remapping-alist '((button . default))) |
| 138 | + (setq-local lsp-treemacs-tree tree) |
| 139 | + (setq-local treemacs-default-visit-action 'treemacs-RET-action) |
| 140 | + (setq-local lsp-treemacs--right-click-actions right-click-actions) |
| 141 | + (setq-local window-size-fixed nil) |
| 142 | + (setq-local treemacs--width-is-locked nil) |
| 143 | + (setq-local treemacs-space-between-root-nodes nil) |
| 144 | + (when treemacs-text-scale |
| 145 | + (text-scale-increase treemacs-text-scale)) |
| 146 | + (lsp-treemacs-generic-mode t) |
| 147 | + ;; (when expand-depth (lsp-treemacs--expand 'lsp-treemacs-generic-root expand-depth)) |
| 148 | + |
| 149 | + )) |
147 | 150 | (current-buffer)))) |
148 | 151 |
|
149 | 152 | (provide 'lsp-treemacs-generic) |
|
0 commit comments