(I am using the nord-vim color scheme, but this is an issue with all color schemes in vim that I've tried, and I am looking for what settings need to be changed to accomplish the desired goal)
I have a problem in vim where if I do a search the highlight text color for the search matches is the same as the visual mode background color, so if I search for some text and then visually select some lines of text containing one or more search results, the text disappears. It does so because visual mode is changing the background color but not the text color, which is the desired behavior, except in the one case of search results, which I would like to change the text color of but only in visual mode.
Is this possible in vim?
EXAMPLE:
(do a search for some text, and it is highlighted)

(visually select some lines of text containing search results)

I would like it if the search results changed text color to some other distinguishable color, to indicate that they are search results, but only in visual mode.
It is sadly not documented but it happens so that some highlight groups, like
Visual, have some sort of priority over others, likeSearch:AFAIK, the only way to explicitly increase the priority of a highlight group is to set its
cterm/guiattribute toreverseand swap the*fgand*bgattributes:But even then, you will notice that it's only the
reversebit that has some effect when interacting withVisual, with the color attributes ofSearchtotally ignored, which may or may not be satisfactory.This gist explains how best to override highlight groups.