ray-x / go.nvim

G'day Nvimer, Joyful Gopher: Discover the Feature-Rich Go Plugin for Neovim
MIT License
2.05k stars 123 forks source link

How to Align sign coverage #441

Closed gmtstephane closed 6 months ago

gmtstephane commented 6 months ago

Hello,

I wonder how i could align the not covered and covered line as shown as in your readme.

The red line is offset with my green one.

image

And I also wonder how i could have a thinner line, like in my git sign diff provided by nvchad. I tried setting an half block ascii character, it works, but then i have the feeling that the red one is the inversion ont the green so it look strange.

image

Thanks you

ray-x commented 6 months ago

To the first question gocoverage_sign = '█', Change it in your config

To the second one, one thing you can try is to increase sign_priority But this should caused by you allowing multiple columns in your sign colunm. Set it back to 1 should also help.

gmtstephane commented 6 months ago

Thanks for the quick response.

If i set :set signcolumn=yes:1 , i still have this .

image

If i change the sign in the config, with "|" for instance, i have this , which is ok for the green one, but the red looks strange.

image

Thanks for your help 👍🏻

ray-x commented 6 months ago

The default sign highlight is defined like this:

  sign_covered_hl = 'String', --- highlight group for test covered sign
  sign_partial_hl = 'WarningMsg', --- highlight group for test partially covered sign
  sign_uncovered_hl = 'Error', -- highlight group for uncovered code

I think the Error in your vim color scheme may have a red background set

you can change 'Error' so foreground color is red and no background, Or you can define your sign color group without a background color.

gmtstephane commented 6 months ago

Thanks that was the color highlight !

image