Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoload #113

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Autoload #113

wants to merge 3 commits into from

Conversation

tubaterry
Copy link

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
Copy link
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

@tubaterry
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant