echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.45k stars 171 forks source link

fix(hipatterns): compute_hex_color_group: cache per style and set default style #1004

Closed folke closed 2 days ago

folke commented 3 days ago

Hi!

Two minor fixes for compute_hex_color_group:

Having a lot of fun with hipatterns for developing tokyonight :)

image

echasnovski commented 2 days ago

Thanks for the PR! Glad 'mini.hipatterns' is useful in so high stakes workflow :)

The highlight group change should be fine, but it needs test for when it is useful and adjusting existing ones. I am a bit busy today, so will take a look in a couple of days.

echasnovski commented 2 days ago

Thanks again for suggesting this!

I've planned to release 'mini.icons' today, but polishing proved to be a bigger challenge (plus someone announced 'tokyonight.nvim' rewrite on Neovim and I don't want 'mini.icons' announcement to be in its shadow :cry:). So I've got some time on my hands.

This now should be resolved on latest main (both 'mini.nvim' and standalone 'mini.hipatterns'). Hope this will simplify the "Dev Environment" of 'tokyonight.nvim'.

folke commented 2 days ago

Wait? Is that what those MiniIcons groups are for? I've been looking through your code everywhre can couldn't find where I had to put them.

They're currently under mini.hue 😅

https://github.com/folke/tokyonight.nvim/blob/main/lua/tokyonight/groups/mini_hue.lua#L7

Either way, thank you, and looking for word to icons!

echasnovski commented 2 days ago

Wait? Is that what those MiniIcons groups are for? I've been looking through your code everywhre can couldn't find where I had to put them.

They're currently under mini.hue 😅

https://github.com/folke/tokyonight.nvim/blob/main/lua/tokyonight/groups/mini_hue.lua#L7

Yeah, adding those groups was the primary motivator for early second round of contributing to all popular color schemes. Those highlight groups work OK-ish with default links but are sometimes not quite good for some color schemes.

And I mentioned an upcoming module in PR :)

folke commented 2 days ago

I totally missed that! :) Will move the groups to a new plugin then.

folke commented 2 days ago

Fixed! https://github.com/folke/tokyonight.nvim/commit/5808dbed0682270f0c40ae7a1bc517ad1fbcaede