Skip to content

Conversation

@DevelopmentCool2449
Copy link

This commit adds customizable buttons to the mode line for debugging actions (see: #171)
This is inspired by @ISouthRain suggestion.

* dape.el (dape-show-buttons-in-mode-line)
(dape-mode-line-buttons-icons, dape-mode-line-buttons-format): New
user options.
(dape--mode-line-create-button): New internal function.
(dape--mode-line-format): Rework.
@ISouthRain
Copy link

ISouthRain commented May 23, 2025

@DevelopmentCool2449

Brother, thank you for taking my advice.
But I don't think modeline is a universal solution. Modeline should only be suitable for personal use and not suitable for merging into dape.
Because the position of the button in the modeline is not fixed, it will change according to the modeline content.
For example, when you pause or setop-in and then go to another buffer, the button may change. Suppose your mouse is at next, but when you go to another buffer, the mouse may be at pause, then you accidentally touch it.

Of course, I'm not a dape contributor, I'm just talking about my concerns.
Anyway, thank you for your contribution to Dape.

@DevelopmentCool2449
Copy link
Author

DevelopmentCool2449 commented May 24, 2025

@DevelopmentCool2449

Brother, thank you for taking my advice. But I don't think modeline is a universal solution. Modeline should only be suitable for personal use and not suitable for merging into dape. Because the position of the button in the modeline is not fixed, it will change according to the modeline content. For example, when you pause or setop-in and then go to another buffer, the button may change. Suppose your mouse is at next, but when you go to another buffer, the mouse may be at pause, then you accidentally touch it.

Yeah you are right, i forgot about this, but I still wonder what other alternative there is for this, especially for users who disable the toolbar or don't use GUI, perhaps replicating the dap-mode floating panel or using the header-line instead mode-line?

We must wait for the author's comment.

@svaante
Copy link
Owner

svaante commented May 29, 2025

Hey thank you for your contribution, I am hesitant to add something like this to the mode line (you can press the dape part of the modline to bring up a menu, but i recognize this is not ergonomic). Keeping with the spirit of aligning with gdm-mi i think tool-bar-mode is the way to go.

If you go ahead and create another solution I will gladly link to it :)

@ISouthRain
Copy link

@svaante
I noticed that dap-mode.el is implemented using posframe.el and function propertize.
Don't know what you think about posframe.el?
Unfortunately, it took me several hours to implement it in dape.el...

@DevelopmentCool2449
Copy link
Author

I'm closing this in favor of #237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants