leodevbro / vscode-blockman

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

Outermost Block is Not good #101

Closed louiss0 closed 1 year ago

louiss0 commented 1 year ago

When it comes to blockman I think It should not cover the outermost scope by default at all. The DX would be much better if it only covered inner scopes. Having it cover the outermost scope is simply just disturbing. I wanted to disable it for vue and for astro but I decided to bring this issue up to you instead.

This is what i'm talking about

IndexPageUsingBlockman

This comes from a file that is using Astro This is a single file component format. The entire page is covered in this block. It's better to simply have the block associated with tags, data structures and functions.

leodevbro commented 1 year ago

Hello, you can disable ground block.

Go to VS Code settings, search: blockman depth0

Type none in N05 and N20.

The idea of ground block is that it helps us to quickly have a general sense of the entire file. I mean, it shows us what is the width of the widest line in the entire file. So we know what is the width of the entire file, without scrolling down and checking every line with our eyes.

louiss0 commented 1 year ago

Hello, you can disable ground block.

Go to VS Code settings, search: blockman depth0

Type none in N05 and N20.

The idea of ground block is that it helps us to quickly have a general sense of the entire file. I mean, it shows us what is the width of the widest line in the entire file. So we know what is the width of the entire file, without scrolling down and checking every line with our eyes.

Thanks for your help. I don't think having a background color around the outermost depth should be the default the padding should be enough. Maybe in the future you could find a way to make it so that the colors change in relation to the theme color.

louiss0 commented 1 year ago

The problem with blockman is that it's always black. If it understood the theme color and adjusted itself based on that then it would be good.

leodevbro commented 1 year ago

If it understood the theme color and adjusted itself based on that

There is already a conversation about it. It seems that VS Code has such limitation that it does not seem any way to detect the theme colors of VS Code from an extension. https://github.com/leodevbro/vscode-blockman/issues/14

louiss0 commented 1 year ago

If it understood the theme color and adjusted itself based on that

There is already a conversation about it. It seems that VS Code has such limitation that it does not seem any way to detect the theme colors of VS Code from an extension. #14

I didn't know. That sucks there has to be a push for this having to change the color means the developer will just use a few set of themes or have to change the settings for each color-related extension every time they change their themes. Until then please consider making closing the outermost block by default. Trust me most people will not turn it on.