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

Add explicit support for 'mini.nvim'

Open echasnovski opened this issue 3 years ago • 4 comments

Hi! I would like to add explicit support for mini.nvim.

Basic choices are taken from either highlight groups to which 'mini.nvim' makes default links or from analogous plugins.

Differences from default linked groups:

  • 'mini.indentscope' is based on 'indent-blankline'.
  • 'mini.jump2d' takes color from "SpellRare" to be consistent with 'mini.jump'. Using nocombine = true to be consistent (not have italic labels on italic text).
  • 'mini.starter' is based on 'dashboard.lua', 'whichkey.lua', 'telescope.lua', and personal choices:
    • MiniStarterSection is chosen to be visible (as from "Special" highlight group).
    • MiniStarterItemBullet is as border.
    • MiniStarterItemPrefix and MiniStarterQuery are based on "warning" and "info" diagnostic colors to be opposite of each other.
  • 'mini.statusline' is based on 'lualine/themes/kanagawa.lua' and personal choices:
    • All MiniStatuslineMode* have bold text as this seems to be used in screenshot.
    • MiniStatuslineDevinfo and MiniStatuslineFileinfo are "slightly different text".
    • MiniStatuslineModeOther is chosen to be different from others.
  • 'mini.tabline' is based on explicit 'TabLine*' groups:
    • MiniTablineCurrent has bold font to be visually distinctive.
    • MiniTablineVisible has slightly darker foreground than MiniTablineCurrent.
    • MiniTablineTabpagesection is chosen from Search.
    • MiniTablineModified* groups have inverted fg and bg of their counterparts.
  • 'mini.test' has red for fail and green for pass. Red and green chosen to be visible inside floating window.
  • 'mini.trailspace' has group with red background to draw attention.

Before:

https://user-images.githubusercontent.com/24854248/177713497-db97ab01-1fb3-4ca2-ac0e-6197ff03d7a0.mp4

After:

https://user-images.githubusercontent.com/24854248/177713537-eebbd893-5579-43ba-aa7f-142610b2ee4f.mp4

echasnovski avatar Jul 07 '22 07:07 echasnovski

please do not use color names directly, instead use their alias defined in themes. This will be safer once other themes will become available.

I replaced "red" and "green" colors with git.removed and git.added.

The only other places with direct color names are mode highlights for 'mini.statusline'. These are verbatim taken from 'lualine/themes/kanagawa.lua'. What do you prefer to do here? Replace with some theme alias (like crystalBlue with fn)? There are duplicates there, what should be done then?

echasnovski avatar Jul 14 '22 13:07 echasnovski

What do you prefer to do here? Replace with some theme alias (like crystalBlue with fn)? There are duplicates there, what should be done then?

That should be optimal, yes. I do not use lualine and I missed that.

rebelot avatar Jul 14 '22 15:07 rebelot

Replaced with corresponding theme aliases in 'mini.statusline' highlight groups. I don't really feel that this is optimal because extra attention is needed to have those groups have separate colors.

echasnovski avatar Jul 14 '22 15:07 echasnovski

Is there any reason why this can't be merged?

I have a vested interest in this PR since I want to use the MiniStatusLine colors in my own plugin.

Cheers.

bluz71 avatar Jan 16 '23 07:01 bluz71