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

WikITocGenerate for more filetypes #346

Closed
felixschurk opened this issue Apr 18, 2024 · 3 comments
Closed

WikITocGenerate for more filetypes #346

felixschurk opened this issue Apr 18, 2024 · 3 comments

Comments

@felixschurk
Copy link

felixschurk commented Apr 18, 2024

I would like to be able to use the WikiTocGenerate function for generation of the TOC for "non-standard" file types, however still following the Markdown syntax.

Currently, when calling the function I do get
wiki: No TOC support for filetype: vimwiki.wiki!
which also makes sense.

Maybe a little background. I use wiki.vim for keeping my notes in wiki, as I use taskwarrior for task management I also use taskwiki as a plugin on vim to handle taskwarrior data. With minor adjustments as in my local repository https://github.com/felixschurk/taskwiki/.
Now in order to have that plugin working as well as the normal wiki I created a custom file type vimwiki.wiki which is standard Markdown and also the files are stored as *.md files.

I assume that the WikiTocGenerate runs over the page and parses # blabla in order to generate the TOC, therefore I do think it would also work with a different file type, as the content in the file is still Markdown.
WikiToc is working, and there also the headers are parsed correctly.

lervag added a commit that referenced this issue Apr 18, 2024
@lervag
Copy link
Owner

lervag commented Apr 18, 2024

I've updated how we consider filetypes for the toc system. Please update and see :help wiki_toc_filetypes. I believe it may also even "just work" for you now without changing any options, since I changed how it specifies the filetype.

@lervag lervag closed this as completed Apr 18, 2024
@felixschurk
Copy link
Author

Thank you a lot. Yes now it does "just work". :)

@lervag
Copy link
Owner

lervag commented Apr 19, 2024

Glad to hear it!

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

No branches or pull requests

2 participants