Closed Parilia closed 1 month ago
Hi there,
I understand why there would be a want for this, especially since the syntax is very close to markdown
.
However it is also different enough where I would need to write a completely custom set of queries and handlers, essentially non of the markdown
logic would really transfer over.
They would start to diverge over time, support different features, really its just not something I want to maintain since I don't look at vim wiki files often.
At this point, at least for now, I've decided to put a line in the scope of this project.
markdown
syntax can potentially be added, callouts are a good example of thisnorg
, org
, or vimwiki
will not be added, though I agree it would be neat, it blows up the scope more than I'm looking forI have however added a feature that allows users to write and add their own custom handlers: https://github.com/MeanderingProgrammer/markdown.nvim/commit/473e48dd0913d2e83610c86c5143a07fd7e60d4e.
You specify the language and write a render
function. The render function will get information like the namespace, buffer, and tree. The plugin core takes care of clearing any marks added to the namespace and re-rendering when necessary, like between mode changes.
Hopefully this strikes a balance between what I like about this plugin and what users want out of it. If people like this feature and add cool things they want to share with the community I can add a doc full of user handlers.
LMK what you think, and thanks for the interest!
Closing for now, lmk if there's anything you'd like to follow up on!
vimwiki isnt only .wiki files. It also can support markdown files. I will look into the custom handlers
This plugin supports specifying the filetypes
it runs on in the configuration. For example:
require('render-markdown').setup({
file_types = { <whatever_ft_vimwiki_is>, 'markdown' },
})
If you're editing a markdown
file as a vimwiki
file, depending on what's going on under the hood of the vimwiki
plugin, this plugin should just work.
filetype
when editing markdown files then the solution above should get you around that.So long as the filetype
is included in the list and treesitter is parsing the buffer as markdown
everything should work.
I would love support for vimwiki https://github.com/vimwiki/vimwiki/