huntertran / markdown-toc

Auto MarkdownTOC (Table Of Contents) plugin for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=huntertran.auto-markdown-toc
MIT License
39 stars 25 forks source link

Feature request: Configuration for number of spaces for list indentation #45

Closed OctagonHex closed 3 years ago

OctagonHex commented 3 years ago

Hello, In our repository we use a linter that has an expected indentation of 2 spaces. (I can't change that policy.) However, this plug-in always generates 4 spaces for the indentation of the unordered list. So either have to live with the warning, or change the indentation manually after every update.

So my feature request is: can you please add an setting that allows the user to change the default number of spaces for the indentation of the unordered list for the TOC?

huntertran commented 3 years ago

Please see #31

OctagonHex commented 3 years ago

Thanks for the link. The solution for me was to add this to settings.json:

    "[markdown]": {
        "editor.tabSize": 2
    },

This is not well documented, though and would never have found this. I think the best way would be to add a checkbox the the settings of Markdown-Toc, saying "Use editor.tabSize for markdown document" If checked (default)-> use editor.tabSize. If not checked, use hard-coded value of 2.

huntertran commented 3 years ago

I've added this to README ;-)