From 84b7e3d8a0463925b39941290b141e6e35a1027b Mon Sep 17 00:00:00 2001 From: Bastian Beranek Date: Sat, 6 Apr 2024 11:03:20 +0200 Subject: [PATCH] Add customization option to control expand depth for dap-ui-sessions (#785) Co-authored-by: Bastian Beranek --- dap-ui.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dap-ui.el b/dap-ui.el index b48615d1..8098224d 100644 --- a/dap-ui.el +++ b/dap-ui.el @@ -57,6 +57,16 @@ number - expand N levels." (number :tag "Expand level")) :group 'dap-ui) +(defcustom dap-ui-sessions-expand-depth nil + "Sessions expand strategy. +When nil - do not expand. +t - expand recursively +number - expand N levels." + :type '(choice (const :tag "Do not expand" nil) + (const :tag "Expand recursively" t) + (number :tag "Expand level")) + :group 'dap-ui) + (defcustom dap-ui-overlay-priority 100 "Overlay's base prioirty." :type 'integer @@ -810,7 +820,7 @@ DEBUG-SESSION is the debug session triggering the event." (dap-ui--show-buffer (lsp-treemacs-render (dap-ui--sessions-tree) - " Debug Sessions " nil + " Debug Sessions " dap-ui-sessions-expand-depth dap-ui--sessions-buffer '(["Delete All Sessions" dap-delete-all-sessions]))) (dap-ui-sessions-mode)