vim / colorschemes

colorschemes for Vim
289 stars 23 forks source link

retrobox inlay hint not visible #257

Closed jacknicklenson closed 9 months ago

jacknicklenson commented 9 months ago

can retrobox add different background color for inlay hint ?

retrobox_inlayhint_issue

Like this for example :

Screenshot_20240209_171247

jacknicklenson commented 9 months ago

this issue also presents in some other themes as well

romainl commented 9 months ago

What is an "inlay hint"? If you mean the "virtual text" sub-feature of :help text-properties, then AFAIK there is no default/fallback highlight group for those. The author of the script that adds the text property is ultimately responsible for choosing what highlight group to use and there is nothing that can be done at the colorscheme level to affect that.

The author of script A might decide to use FooBar while the author of script B might settle on BarBaz, and neither of witch can be expected to be defined by a given colorscheme. If they decide to use a default highlight group, then that highlight group is used as is. Changing something like Constant or String in a built-in colorscheme just because some plugin author happens to use it for virtual text makes no sense at all.

The right thing to do is for the plugin author to define their own VirtualText highlight group and use it.

habamax commented 9 months ago

vim-lsp link it to Conceal afaik

romainl commented 9 months ago

Well that's my point: vim-lsp is using Conceal, coc is using CocInlayHint, etc.

Facts:

so there is nothing we can do in Retrobox or other built-in colorschemes.

From there you have two sensible options:

  1. Petition the maintainers of your plugins to define a sensible highlight group for their virtual text, not merely misuse an existing one.
  2. Convince the Vim team to add a fallback VirtualText highlight group for when none is provided. It should be linked to Normal by default to maintain the current behavior of not highlighting virtual text.
habamax commented 9 months ago

It looks like Conceal is used in the screenshots and retrobox has it bluish.

Updated to make it more conceal:

image

image