@@ -124,6 +124,26 @@ Fallback to list all workspaces if no project root is found."
124124 :type 'boolean
125125 :group 'lsp-treemacs )
126126
127+ (defcustom lsp-treemacs-error-list-expand-depth 3
128+ " Automatic expansion depth for `lsp-treemacs-error-list' "
129+ :type 'number
130+ :group 'lsp-treemacs )
131+
132+ (defcustom lsp-treemacs-call-hierarchy-expand-depth 2
133+ " Automatic expansion depth for `lsp-treemacs-call-hierarchy' "
134+ :type 'number
135+ :group 'lsp-treemacs )
136+
137+ (defcustom lsp-treemacs-type-hierarchy-expand-depth 3
138+ " Automatic expansion depth for `lsp-treemacs-type-hierarchy' "
139+ :type 'number
140+ :group 'lsp-treemacs )
141+
142+ (defcustom lsp-treemacs-java-deps-list-expand-depth 2
143+ " Automatic expansion depth for `lsp-treemacs-java-deps-list' "
144+ :type 'number
145+ :group 'lsp-treemacs )
146+
127147(defun lsp-treemacs--open-file-in-mru (file )
128148 (select-window (get-mru-window (selected-frame ) nil :not-selected ))
129149 (find-file file))
@@ -482,7 +502,7 @@ will be rendered an empty line between them."
482502 (display-buffer-in-side-window
483503 (lsp-treemacs-render
484504 (-map 'lsp-treemacs-deps--process-dep (lsp-treemacs-deps--root-folders))
485- " *Java Deps*" nil )
505+ " *Java Deps*" lsp-treemacs-java-deps-list-expand-depth )
486506 lsp-treemacs-deps-position-params)))
487507
488508(defun lsp-treemacs--deps-find-children-for-key (node key )
@@ -823,7 +843,7 @@ With a prefix argument, show the outgoing call hierarchy."
823843 (lsp-request " textDocument/prepareCallHierarchy"
824844 (lsp--text-document-position-params)))
825845 (concat (if outgoing " Outgoing" " Incoming" ) " Call Hierarchy" )
826- nil " *Call Hierarchy*" nil t ) nil ))))
846+ lsp-treemacs-call-hierarchy-expand-depth " *Call Hierarchy*" nil t ) nil ))))
827847
828848
829849
@@ -894,7 +914,7 @@ With prefix 2 show both."
894914 ((eq lsp-treemacs--hierarchy-super direction) " Super" )
895915 ((eq lsp-treemacs--hierarchy-both direction) " Sub/Super" ))
896916 " Type Hierarchy" )
897- nil
917+ lsp-treemacs-type-hierarchy-expand-depth
898918 " *lsp-treemacs-call-hierarchy*" ))
899919 (user-error " No class under point." ))
900920 (setq lsp--buffer-workspaces workspaces)))
@@ -1029,7 +1049,7 @@ With prefix 2 show both."
10291049 (lsp-session-folders)
10301050 (-keep #'lsp-treemacs--build-error-list )))
10311051 " Errors List"
1032- nil
1052+ lsp-treemacs-error-list-expand-depth
10331053 lsp-treemacs-errors-buffer-name
10341054 `([" Cycle Severity" lsp-treemacs-cycle-severity])))
10351055
0 commit comments