naokazuterada / MarkdownTOC

SublimeText3 plugin which generate a table of contents (TOC) in a markdown document.
https://packagecontrol.io/packages/MarkdownTOC
MIT License
301 stars 48 forks source link

Allow 'update on save' to work on .txt files, and allow this to be customised in settings #169

Open 0xdevalias opened 8 months ago

0xdevalias commented 8 months ago

Purpose

Currently update on save happens for 'Markdown' files:

Which is defined as:

How important it is

Would be pretty useful.

Ideal implementation

Being able to configure what extensions/file types the 'update on save' works on in the package settings would make the most sense to me.

.txt doesn't need to be added as a default, but being able to manually configure it would be helpful.

Currently this list seems to be hardcoded in markdowntoc/autorunner.py:

https://github.com/naokazuterada/MarkdownTOC/blob/b61546d001661d9385423556a62c21c36abc6857/markdowntoc/autorunner.py#L5-L11