Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better highlight breakpoints and current line at which execution is paused at #5952

Closed
filipdutescu opened this issue Feb 12, 2023 · 13 comments · Fixed by #5957
Closed

Better highlight breakpoints and current line at which execution is paused at #5952

filipdutescu opened this issue Feb 12, 2023 · 13 comments · Fixed by #5957
Labels
A-debug-adapter Area: Debug adapter client A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@filipdutescu
Copy link
Contributor

Description

Currently, breakpoints do not use a conventional symbol, such as the classic filled red circle. The current line at which execution is paused at is also not properly shown. This makes debugging at least somewhat more challenging than it should probably be.

Proposal

  1. Change the current symbol to the aforementioned conventional one
  2. Add new theme highlights for breakpoint and current line colors
  3. Highlight the current line at which debugging is stopped at

UI mockup

image

@filipdutescu filipdutescu added the C-enhancement Category: Improvements label Feb 12, 2023
@pascalkuthe
Copy link
Member

pascalkuthe commented Feb 12, 2023

I think this would be quite easy to accomplish:
Right now in helix-term/src/ui/editor.rs:114 the highlight is set to:

let style = theme.get("ui.highlight");

I think all you would need to do is use a custom theme key here like ui.highlight.breakpoint and add it to a couple of themes. That would be a very uncontroversial change.

Regarding the gutter I think #5371 could provide a means to customize the exact icon.

In a TUI our hands are a bit bound with the styling of the icon.
The red circle is already used for diagnostic errors and it doesn't look as nice as in your mockup because its quite a bit smaller:
image

You could consider experimenting whether setting this to bold or using a different icon works better.

Perhaphs there is a different symbol we could use?

@pascalkuthe pascalkuthe added A-debug-adapter Area: Debug adapter client A-helix-term Area: Helix term improvements labels Feb 12, 2023
@filipdutescu
Copy link
Contributor Author

filipdutescu commented Feb 12, 2023

I used the NerdFonts na-fa-circle icon in my mockups (search here: https://www.nerdfonts.com/cheat-sheet).

image

We could probably use that (togglable/customizable of course, since maybe not everyone has nerdfonts). Would you say this change is dependent on #5371 then?

@pascalkuthe
Copy link
Member

If you want to use a nerdfont symbol this would depend on #2869 instead.

In general we would not be using nerdfont icons by default to ensure helix can be rendered everywhere with just default fonts. Although we could just keep the current icons for now (I think the red hihglight already goes a long way) and only change the icon for use with nerdfonts once #2869 lands

@filipdutescu
Copy link
Contributor Author

I could substitute it for a B in the meantime I guess. Is there any resource on how to find default icons? Or how where those already existing chosen?

@filipdutescu
Copy link
Contributor Author

Let's make it with the current available icons for now and when #2869 lands we can explore adding nerdfont icons.

filipdutescu added a commit to filipdutescu/helix that referenced this issue Feb 12, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been
paused at. The two new keys are `ui.highlight.breakpoint` and
`ui.highlight.currentline`. Highlight according to those keys, both the
line at which debugging is paused at and the breakpoint indicator.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Feb 12, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been
paused at. The two new keys are `ui.highlight.breakpoint` and
`ui.highlight.currentline`. Highlight according to those keys, both the
line at which debugging is paused at and the breakpoint indicator.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
@archseer
Copy link
Member

You can just use the same dot we use for diagnostics

@archseer
Copy link
Member

Rather than a dot, a triangle seems a lot more fitting
image

and taken from https://en.wikipedia.org/wiki/Geometric_Shapes_(Unicode_block)

@archseer
Copy link
Member

I'd prefer a lighter highlight than red, which is why I picked the existing ui.highlight color. Some more design ideas here: https://emacs-lsp.github.io/dap-mode/page/gallery/

@filipdutescu
Copy link
Contributor Author

You can just use the same dot we use for diagnostics

Precisely what I did for the current implementation. I would like to offer, in the future, the possibility of user-defined icons, probably by means of nerdfonts.

Rather than a dot, a triangle seems a lot more fitting
image

and taken from https://en.wikipedia.org/wiki/Geometric_Shapes_(Unicode_block)

I assume you mean for the current line at which execution is paused at. If so, I agree, this would be a good improvement, but I think the only way to do it is to override the breakpoint icon with the triangle one, right?

@filipdutescu
Copy link
Contributor Author

I'd prefer a lighter highlight than red, which is why I picked the existing ui.highlight color. Some more design ideas here: https://emacs-lsp.github.io/dap-mode/page/gallery/

Will modify the default theme according to your preference then. Thanks for letting me know, I used that colour as it is what I am accustomed to.

@CptPotato
Copy link
Contributor

In general we would not be using nerdfont icons by default to ensure helix can be rendered everywhere with just default fonts. Although we could just keep the current icons for now (I think the red hihglight already goes a long way) and only change the icon for use with nerdfonts once #2869 lands

Here are some unicode options:

image
(or more)

filipdutescu added a commit to filipdutescu/helix that referenced this issue Feb 13, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been
paused at. The two new keys are `ui.highlight.breakpoint` and
`ui.highlight.currentline`. Highlight according to those keys, both the
line at which debugging is paused at and the breakpoint indicator.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Feb 20, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been
paused at. The two new keys are `ui.highlight.breakpoint` and
`ui.highlight.currentline`. Highlight according to those keys, both the
line at which debugging is paused at and the breakpoint indicator.

Also add two new scopes, `ui.debug.cursor` and `ui.debug.selection`,
to cover the cursor and selection highlighting during debugging, since
it might look of using the default ones. Refactor logic to ensure
only ranges found inside the line at which execution is paused at are
overwritten.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
@filipdutescu
Copy link
Contributor Author

After a lot of discussion, the redesigned UI/theme will look like this (default theme for reference):

image

filipdutescu added a commit to filipdutescu/helix that referenced this issue Feb 23, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 6, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
@filipdutescu
Copy link
Contributor Author

After talking some more with @archseer, we landed on this colour for the debug highlight, which I find beautiful:

image

filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 9, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 9, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 9, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 10, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 10, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 10, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 10, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 10, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 13, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 14, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 17, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
filipdutescu added a commit to filipdutescu/helix that referenced this issue Mar 25, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952
Signed-off-by: Filip Dutescu <[email protected]>
archseer pushed a commit that referenced this issue Mar 29, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on #2869, and as such will be handled in the
future, once it lands.

Closes: #5952

Signed-off-by: Filip Dutescu <[email protected]>
Triton171 pushed a commit to Triton171/helix that referenced this issue Jun 18, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952

Signed-off-by: Filip Dutescu <[email protected]>
wes-adams pushed a commit to wes-adams/helix that referenced this issue Jul 4, 2023
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952

Signed-off-by: Filip Dutescu <[email protected]>
smortime pushed a commit to smortime/helix that referenced this issue Jul 10, 2024
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on helix-editor#2869, and as such will be handled in the
future, once it lands.

Closes: helix-editor#5952

Signed-off-by: Filip Dutescu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debug-adapter Area: Debug adapter client A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants