nord.nvim icon indicating copy to clipboard operation
nord.nvim copied to clipboard

Add default color for hl-group Substitute

Open trevarj opened this issue 2 years ago • 6 comments

The Substitute highlight group should probably be added since the default appears too white-on-white when doing substitutions (:s///).

My suggestion is to use orange (#D08770, nord12).

trevarj avatar Dec 21 '22 07:12 trevarj

Hello,

Normaly when you make a :%s/TOTO/TITI/g the matching use Search colors The white on white have normaly been fixe 2 weeks ago... by use:

Search = { fg = nord.nord10_gui, bg = nord.nord6_gui, style = "reverse" },

Are you testing the last version of nord.nvim ?

If i use two lines like that

Search = { fg = nord.nord10_gui, bg = nord.nord6_gui, style = "reverse" }, Substitute = { fg = nord.nord12_gui, bg = nord.nord6_gui, style = "reverse" },

Then the search will use Blue and the Substitute use Orange .... Is it what you asking for ?

Personally i prefert use Blue bg for both but why not use two colors ...

Regards

Hierosme avatar Dec 21 '22 10:12 Hierosme

Hi @Hierosme, I am using a latest version (installed/updated with packer), but I still see the white on white for some reason. I noticed it most recently in a :help page.

I don't mind keeping the colors the same for defaults - I will override with my own taste after 😬

trevarj avatar Dec 21 '22 10:12 trevarj

OK,

i suspect the style=reverse simply not work for you.

Then the search should not use the reverse style. That attribute is only require for pure Black color ...

I sugess to change the Search line to that

Search = { fg = nord.nord6_gui, bg = nord.nord10_gui },

and with you confirmation: i'll add Substitute = { fg = nord.nord6_gui, bg = nord.nord12_gui },

Have you capability to make the test ? I can send a PR if that is more simple to test for you .

Hierosme avatar Dec 21 '22 10:12 Hierosme

That seems ok to me. It's only a question for the maintainer now, so feel free to make the PR.

trevarj avatar Dec 21 '22 10:12 trevarj

Got a super result with that:

IncSearch = { fg = nord.nord6_gui, bg = nord.nord10_gui }, Search = { fg = nord.nord6_gui, bg = nord.nord10_gui }, Substitute = { fg = nord.nord0_gui, bg = nord.nord12_gui },

You suggestion is totaly a good thing ...

Then Read only search is blue, Write replacement is Orange. the effect is good, and inform the user about a dangerous operation. (As recommended by the Nord color palette.)

Here the commit> https://github.com/shaunsingh/nord.nvim/commit/6e9655c49b35cc827cf1f4e663ab60c368905fc2

The PR is on read: https://github.com/shaunsingh/nord.nvim/pull/132

Orange color look correct and let Red for error...

Hop you'll appreciate the change.

Let me know if i can open a beer ...

Regards

Hierosme avatar Dec 21 '22 11:12 Hierosme

@Hierosme Awesome, thank you! 🍻

trevarj avatar Dec 21 '22 11:12 trevarj