Skip to content

Rendering Markdown in help buffers #500

Discussion options

You must be logged in to vote

I'm trying to ensure all help filetypes are rendered as markdown.

By default help files are parsed as vimdoc. You can override this to markdown by adding this line somewhere in your config:

vim.treesitter.language.register('markdown', 'help')

Which tells neovim to parse help files as markdown without changing the filetype. You also need to keep help in the ft list for this plugin since the filetype has not been changed.

While this will technically "work" this doesn't actually change the contents of the help docs which are not written using markdown so the results are probably worse than just using treesitter with the vimdoc parser installed. But if you like the result feel free to use it.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@thevinchi
Comment options

@MeanderingProgrammer
Comment options

Answer selected by thevinchi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants