stackbreak / comment-divider

Divide your code by sections with styled separators
https://marketplace.visualstudio.com/items?itemName=stackbreak.comment-divider
GNU General Public License v3.0
71 stars 19 forks source link

Add feature for indented code #25

Closed AndreasLuckert closed 3 years ago

AndreasLuckert commented 3 years ago

It'd be nice if the tool could recognize two things:

  1. Language-specific horizontal ruler-extension limits defined in the settings.json - file:

    "[python]": {
        "editor.rulers": [
            80,
            120
        ]
    }
  2. Indentation according to current code: Instead of heaving to tab it over and then accept that the ruler exceeds the vertical limits like so ...

    # ------------------------------- Some function ------------------------------ #
    def func():
    
    # ------------------------------- Sub-function ------------------------------- #
    def sub_func():
        pass

... it'd be awesome of the extension calculated automatically the difference between the indentation and the vertical right limit, which would lead to following result:

# ------------------------------- Some function ------------------------------ #
def func():

    # ----------------------------- Sub-function ----------------------------- #
    def sub_func():
        pass
stackbreak commented 3 years ago

@AndreasLuckert released