Open okkdev opened 9 months ago
this is a cool idea and basically exactly what I envisioned when i made that feature, so I'll try to figure this out soon
:print(vim.strdisplaywidth('▄▀'))
>> 2
ah, this might be the problem. even though it's displayed in a single cell, ▄▀
takes up two columns, which is halving the resolution of the highlights compared to the pixels
so if you have some code that's generating local hl = {
you should update it to calculate the highlight ranges using vim.strdisplaywidth
instead of #
or whatever @okkdev
Hm, for me ▄▀
is not displayed in a single cell and it shouldn't. I set either ▄
or ▀
and if I need both I set the upper block and add a background color. 🤔
I'm trying to do the same same thing and getting the same problem. Any idea how to fix?
Okay so I got mine working. I had to count each ▄
or ▀
as having a width of 3, while other characters were still 1. I'm not sure how I was supposed to know this. Each of those characters renders as 1 cell wide for me and strdisplaywidth
says they have a width of 1.
Hi, I'm generating pokemon sprites with highlight groups, but the highlighting isn't behaving how I'm expecting and I can't figure out how to apply it correctly.
I'm trying to set the color of each individual pixel that has a color by generating the highlight group named
PokePixel_ROW_COLUMN
and then adding them to the opts.hl two dimensional table as{"PokePixel_ROW_COLUMN", COLUMN, COLUMN+1}
This is how it should look:
This is how it's currently looking in alpha nvim:
This is the code: