leodevbro / vscode-blockman

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

Flag to support only highlight the current block or active block #80

Closed sujeet-agrahari closed 2 years ago

sujeet-agrahari commented 2 years ago

By default it highlights all the block and sub-blocks which overrides selected theming colors.

Can we have flag which could set whether it should target only the active block or nested?

leodevbro commented 2 years ago

Yes, I think Blockman has many settings to do various of colorings.

Example 1:

"blockman.n33A01B1FromDepth0ToInwardForAllBorders": "10,0,0,1; none",
"blockman.n33A01B2FromDepth0ToInwardForAllBackgrounds": "10,0,0,1; none",

2022-05-18_12-08-48



Example 2:

"blockman.n33A01B1FromDepth0ToInwardForAllBorders": "10,0,0,1; none",
"blockman.n33A01B2FromDepth0ToInwardForAllBackgrounds": "10,0,0,1; none",

"blockman.n33A05B2FromFocusToInwardForAllBackgrounds": "50,0,0,1; rgb(8, 22, 33)",

2022-05-18_12-11-30



Example 3:

"blockman.n33A01B1FromDepth0ToInwardForAllBorders": "10,0,0,1; none",
"blockman.n33A01B2FromDepth0ToInwardForAllBackgrounds": "10,0,0,1; none",

"blockman.n33A05B2FromFocusToInwardForAllBackgrounds": "50,0,0,1; rgb(8, 22, 33) > red > green"

2022-05-18_12-16-25

leodevbro commented 2 years ago

Also please see the "Advanced Coloring" instructions on Blockman page. There is also video instruction link of Youtube. https://youtu.be/UsET6-kPu90

sujeet-agrahari commented 2 years ago

@leodevbro Thanks. Example 2 works. It's not exactly what I wanted. But It will work.

leodevbro commented 2 years ago

Feel free to add some more details for your need, so I will be able to understand it more clearly and maybe provide a better solution.

sujeet-agrahari commented 2 years ago

Currenltly with above configuration, example 2, it highlights tand adds background to the current selected block. But, it also puts border on all blocks and nested blocks.

I don't want those borders, I only want a background color on the selected block.

leodevbro commented 2 years ago

You mean in your machine it is not showing the same way as my screenshot? Nested blocks should not have borders with the configuration of example 2. Maybe you have changed some other advanced coloring settings. Can you screenshot the blocks and also copy-paste all the settings of Blockman from settings.json file?

Before that, maybe you can try elevating the priorities of these settings like this:

"blockman.n33A01B1FromDepth0ToInwardForAllBorders": "200,0,0,1; none",
"blockman.n33A01B2FromDepth0ToInwardForAllBackgrounds": "200,0,0,1; none",

"blockman.n33A05B2FromFocusToInwardForAllBackgrounds": "250,0,0,1; rgb(8, 22, 33)",
sujeet-agrahari commented 2 years ago

It worked now perfectly. There some setting populated as a result of my tries I guess. I cleaned and add above lines. Thanks, I was exactly looking for this.

Just one thing what about dropping some nice shadow and giving some padding, may be, onto the selected block?

leodevbro commented 2 years ago

For padding, Blockman has only right-side padding settings, please search "padding" in Blockman page. There you can see the GIF instruction.

For shadow, it's kinda problematic, because CSS is very limited in VS Code extension environment. Maybe I will be able to implement HTML SVG blocks instead of currently implemented HTML div Blocks in the future to make the styling more flexible.