helix icon indicating copy to clipboard operation
helix copied to clipboard

Is it possible to drop the red dot before the line that has error, change the line number to red?

Open stokhos opened this issue 3 years ago • 4 comments

Is it possible to drop the red dot before the line that has an error, and change the line number to red? Or maybe add an option for this. Doing this will save some spaces

Best

stokhos avatar Oct 24 '22 00:10 stokhos

Since we are using the same space for breakpoint and diagnostic. I have the following questions.

  1. What should be the style of the line number if it has a breakpoint and diagnostic? Current behavior: It will show the breakpoint if available or show the diagnostic.

  2. Since we have diff styles/colors for the current line. What should be the style in case of if the line has both the cursor and the diagnostic/breakpoint? Current behavior: Line number color and diagnostic/breakpoint are in separate spaces so no problem.

grv07 avatar Oct 25 '22 06:10 grv07

Since we are using the same space for breakpoint and diagnostic. I have the following questions.

1. What should be the style of the line number if it has a breakpoint and diagnostic?
   Current behavior: It will show the breakpoint if available or show the diagnostic.

| we could change the line number alignment. Line numbers are right-aligned; we could change the line number to a red left-aligned number.

2. Since we have diff styles/colors for the current line. What should be the style in case of if the line has both the cursor and the diagnostic/breakpoint?
   Current behavior: Line number color and diagnostic/breakpoint are in separate spaces so no problem.

| No changes in current line styles if there is no error or breakpoint in this line.

@kirawi I'd like to work on this. Could you tell me where I should get started?

stokhos avatar Oct 26 '22 02:10 stokhos

You could take a look at https://github.com/helix-editor/helix/blob/65edf9c19880fe4fd068db6d86c4c2830c8a91f6/helix-term/src/ui/editor.rs#L710-L826

kirawi avatar Oct 26 '22 02:10 kirawi

A couple of quick accessibility/design notes:

  • Colour should never be the only differentiator (think: colour blindness)
  • If this is going to be implemented, it should be a non-default preference setting.
  • Preferences shouldn’t be seen as an easy alternative to making design decisions.

hth :)

aral avatar Nov 02 '22 09:11 aral