Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Autoload - #113

Open
adaswordlace wants to merge 3 commits into
nok:masterfrom
adaswordlace:autoload
Open

adaswordlace wants to merge 3 commits into
nok:masterfrom
adaswordlace:autoload

Conversation

@adaswordlace

Copy link
Copy Markdown

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)

@adaswordlace

Copy link
Copy Markdown
Author

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

@adaswordlace

Copy link
Copy Markdown
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant