Skip to content

Feature Request: Support Different Divider Styles per Header Type and Language #61

Description

@WindyLuf

First of all, thank you for creating this excellent extension. I use it frequently in my daily development, and it has greatly improved the readability of my code.

I have a couple of feature requests that I believe would make the extension even more flexible.

  1. Allow different divider lengths for different header types

Currently, line, mainHeader, and subHeader all share the same divider length.

It would be great if each type could have its own configurable length, for example:

{
"comment-divider.lineLength": 80,
"comment-divider.mainHeaderLength": 100,
"comment-divider.subheaderLength": 60
}

This would allow users to distinguish different header levels more clearly.

  1. Allow different divider styles for different languages

Many projects use different comment styles depending on the programming language.

For example:

C/C++ / Verilog / Assembly

//======================== Initialization ========================

Python

#======================== Initialization ========================

Shell

#------------------------ Initialization ------------------------

It would be very helpful if the extension could support language-specific configurations, such as:

{
"comment-divider.languages": {
"cpp": {
"mainHeaderFiller": "=",
"subheaderFiller": "-"
},
"python": {
"mainHeaderFiller": "=",
"subheaderFiller": "="
},
"asm-collection": {
"mainHeaderFiller": "=",
"subheaderFiller": "="
}
}
}

This would make it much easier to maintain a consistent coding style across different languages and projects.

Thank you for considering these suggestions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions