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

Share we add link option for custom highlight?

Open YuCao16 opened this issue 2 years ago • 4 comments

This PR introduces the ability to link one highlight group to another within the plugin. This feature allows users to easily set up and manage complex highlight configurations.

YuCao16 avatar Jul 18 '23 19:07 YuCao16

@YuCao16 Can you add an example to the doc?

navarasu avatar Aug 07 '23 16:08 navarasu

@YuCao16 Can you add an example to the doc?

Sure, I will, later today.

YuCao16 avatar Aug 07 '23 16:08 YuCao16

@navarasu I have added one example in section Customization. By the way, I'd recommend we link NeoTreeWinSeparator to VertSplit:

NeoTreeWinSeparator = { link = "VertSplit" }

YuCao16 avatar Aug 07 '23 21:08 YuCao16

This feature merged will make life of contributors and users a lot easier. For at least the following reasons:

  • Linking allows specifying only the highlight group name without the need to search in which table the similar highlight group is previously defined.
  • Linked highlight group can be safely defined before the group it is linked to.
  • Linked highlight groups means that they should be highlighted similarly. This allows users to tweak only one (original) highlight group and the others will also change how they are displayed.

echasnovski avatar Jun 25 '24 08:06 echasnovski