markdown-toc icon indicating copy to clipboard operation
markdown-toc copied to clipboard

Autoload

Open tubaterry opened this issue 5 years ago • 2 comments

We can now read in an existing TOC when loading a markdown file.

  • New addition: Activate when markdown grammar gets used

  • On Activation, check all existing textEditors for markdown and assign a Toc object per textEditor using markdown. (Previously the Toc object was assigned to paneItems).

  • On addition of new text editors (onDidAddTextEditor callback), check if it's using markdown and assign Toc object if necessary.

Downside: this could be more efficient - first textEditor to load a markdown file runs through init twice (on both activate hook and onDidAddTextEditor callback)

tubaterry avatar Mar 31 '19 06:03 tubaterry

@nok - Just pinging you because this repo hasn't seen any activity in a while, wanted to make sure it didn't get lost

tubaterry avatar Mar 31 '19 06:03 tubaterry

Not ready yet - Selecting Add adds a TOC at the cursor position of every open markdown file.

tubaterry avatar Apr 02 '19 15:04 tubaterry