shaunsingh / nord.nvim

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support
GNU General Public License v2.0
796 stars 107 forks source link

Add default color for hl-group Substitute #133

Open trevarj opened 1 year ago

trevarj commented 1 year ago

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).

Hierosme commented 1 year ago

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

trevarj commented 1 year ago

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 😬

Hierosme commented 1 year ago

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 .

trevarj commented 1 year ago

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

Hierosme commented 1 year ago

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

trevarj commented 1 year ago

@Hierosme Awesome, thank you! 🍻