I want to add horizontal guide line for each block / section of code

I've searched a lot about indentation bot I've get only dots.
This situation might be duplicated but frankly after more than 2 hours on looking on github / stack / google I couldn't solve me this small issue.

Below I've added with red the result that I want to have

Many thanks in advance

[![enter image description here](https://i.stack.imgur.com/Dx5jm.png)](https://i.stack.imgur.com/Dx5jm.png)