Skip to content

Make default size and position of dap-ui buffers (sessions, locals, breakpoints,...) configurable #846

@ecky-l

Description

@ecky-l

When I am in debug mode and open one of the auxiliary windows, like with dap-ui-locals (from the dap-hydra), the window does always open with a predefined size that is way too small for my setup. I know how to change this, but it means to always perform 5 steps:

  1. change into the buffer with the code being debugged
  2. close dap-hydra by pressing "q"
  3. change into the locals buffer
  4. press "w" and change the window size
  5. change into the code buffer and open dap-hydra again

Since I regularly open the auxiliary windows only when I need them, this is quite a hassle. So I was searching for a way to configure the default window sizes (and positions), but could not find one. The only thing I could find was a variable definition in dap-ui.el that reads

(defvar dap-ui-buffer-configurations
  `((,dap-ui--locals-buffer . ((side . right) (slot . 1) (window-width . 0.20)))
    (,dap-ui--expressions-buffer . ((side . right) (slot . 2) (window-width . 0.20)))
    (,dap-ui--sessions-buffer . ((side . right) (slot . 3) (window-width . 0.20)))
    (,dap-ui--breakpoints-buffer . ((side . left) (slot . 2) (window-width . ,treemacs-width)))
    (,dap-ui--debug-window-buffer . ((side . bottom) (slot . 3) (window-width . 0.20)))
    (,dap-ui--repl-buffer . ((side . bottom) (slot . 1) (window-height . 0.45)))))

But I was unsuccessful in copying and modifying this code into my init.el (need to mention btw., I am not an Emacs Lisp expert).

A documented way to change the default sizes/positions does apparently not exist. Would it be possible to make these parameters configurable, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions