Skip to content

Commit 6cfffec

Browse files
committed
Fix lsp-treemacs to work with latest treemacs
- fixes #142
1 parent f7ae975 commit 6cfffec

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

lsp-treemacs-generic.el

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,23 @@
130130
&optional buffer-name right-click-actions _clear-cache?)
131131
(let ((buffer (get-buffer-create (or buffer-name "*LSP Lookup*"))))
132132
(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+
))
147150
(current-buffer))))
148151

149152
(provide 'lsp-treemacs-generic)

0 commit comments

Comments
 (0)