leodevbro / vscode-blockman

VSCode extension to highlight nested code blocks
https://github.com/leodevbro/vscode-blockman
MIT License
345 stars 16 forks source link

Support double width chars settings will be lost every time VSCode is restarted #122

Open 0xyk3r opened 9 months ago

0xyk3r commented 9 months ago

I used the Blockman Toggle Try Support Double Width Chars command, but when I closed and reopened VSCode, the switch was reset. Maybe this feature could become a setting?

leodevbro commented 9 months ago

Hi, this feature (Try Support Double Width Chars) does not work well many times, because in some situations, often the different width characters (like this: 字) have not exactly double width but 1.5 width or 1.3 or 2.4 or something like that.

Blockman cannot determine exact width because of the limitations of VS Code itself. So, Blockman just hopes that the different width character is exactly double width and calculates the sizes of blocks with this assumption.

But, if you find it working well in your specific scenario, then please let me know and I will try to update Blockman soon and make it stay ON even after restart.

0xyk3r commented 9 months ago

It may not work perfectly (width will be wider than expected), but I think in my scenario (custom fonts and Chinese environment), it is better when it is turned on than when it is not turned on. So far I am turning it on At that time, no problems were found.

So I think this feature can be used as a setting item. It is turned off by default and can be turned on at the user's discretion.

leodevbro commented 9 months ago

Ok, I'll try to update Blockman soon. Probably today or tomorrow or in several days. Thanks for your feedback.