File tree Expand file tree Collapse file tree
lua/dap-view/options/winbar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,16 +99,23 @@ M.set_action_keymaps = function(bufnr)
9999 if bufnr or state .bufnr then
100100 local winbar = setup .config .winbar
101101
102+ local win_width = api .nvim_win_get_width (state .winnr )
103+
102104 for k , view in pairs (winbar .sections ) do
103105 local section = winbar .custom_sections [view ] or winbar .base_sections [view ]
104106
105107 if section == nil then
106108 vim .notify_once (" View '" .. view .. " ' not found, skipping setup" , log .WARN )
107109 winbar .sections [k ] = nil
108110 else
111+ local desc = type (section .label ) == " function" and section .label (win_width , state .current_section )
112+ or section .label
113+
114+ --- @cast desc string
115+
109116 vim .keymap .set (" n" , section .keymap , function ()
110117 M .wrapped_action (view )
111- end , { buffer = bufnr or state .bufnr })
118+ end , { buffer = bufnr or state .bufnr , desc = desc })
112119 end
113120 end
114121 end
You can’t perform that action at this time.
0 commit comments