Closed luluman closed 2 months ago
Hey! I am not really sure what you issue you are highlighting,
dape
used to use overlay-arrow-variable-list
to show stack pointer, but moved away for more control on how fringe bitmaps are displayed as to better indicate that an line has an breakpoint and is the current stack pointer.
As shown in the following screen dumps:
When stack pointer moves to the line of the breakpoint the fringe bitmap is displayed with the same face as an break point to indicate that current line contains an breakpoint.
As for display-line-numbers-mode
and terminal dape
works fine:
If your looking for more customization options dape
uses the value of overlay-arrow-string
to display stack pointer when fringe is not available (terminal or fringe style no-fringes
or right-only
)
It might be worth while to take another crack at overlay-arrow-variable-list
to see if there is any way to ensure the fringe "Z" order.
Thank you for your prompt response and for providing more context.
Here's my proposal:
The current implementation using overlays cannot use the line-number margin to display the "=>" indicator. This results in overlap with the code text if it is improperly formatted.
On the other hand, overlay-arrow-variable-list
can utilize the line-number margin and leave the left margin (reserved for breakpoints) untouched.
However, when line-number mode is disabled, it also covers the text. In scenarios where there is no line-number space, both solutions are equally problematic.
This is using overlay-arrow-variable-list
.
This is using overlay.
I prefer using overlay-arrow-variable-list
in terminal mode as it can use line-number space to clearly distinguish between breakpoints and the current-line indicator.
@luluman I was able to recreate the wanted features with overlay-arrow-variable-list
on master.
Please get back to me if it solves this issue.
@svaante Thank you for your modification. It has been very helpful, providing more configuration options and working well within the terminal. Now I can customize my DAPE appearance like this, and it looks great:
(use-package dape
:custom
(dape-buffer-window-arrangement 'right) ;; Info buffers to the right
(dape-breakpoint-margin-string "●") ;; ◯
:config
(put 'dape--overlay-arrow-position
'overlay-arrow-string ;; ▶ →
(propertize "▶" 'face 'dape-stack-trace-face)))
The
overlay-arrow-variable-list
is preferred for showing the debug line indicator used by gud.el and realgud/fringe.el. The built-indisplay-line-numbers-mode
works well withoverlay-arrow-variable-list
, displaying debug information effectively.Here is my configuration with symbol "▶"
We can configure the face and symbols used for display with
'overlay-arrow-string
, which allows for customization. However, the current implementation uses overlays, which do not work well within a terminal. This might work better in a GUI, though I haven't tested it.I hope we can modify this implementation to use
overlay-arrow-variable-list
. I'm not proficient in Elisp and, while I've tried some demos, I cannot propose a solid solution.I noticed that the function
dape--inlay-hint-add
uses the overlay ofdape--stack-position
, but fixing this compatibility issue is beyond my expertise.