The following guide goes from easy to complex operations that can help when this plugin is not functioning how you expect. As such it is recommended to go in order.
:checkhealth render-markdown
If there are any errors
these should be looked at closely, warnings
can largely
be ignored. They are generated to help debug issues for less critical components,
i.e. LaTeX
support.
This plugin only operates on markdown
files by default, but can be expanded to
run on any filetype with markdown
injected by providing it in the config:
require('render-markdown').setup({
file_types = { 'markdown', <other_filetype> },
})
Once you confirm the list of filetypes
you expect this plugin to work on get
the filetype
of the current buffer and make sure it is in that list:
:lua vim.print(vim.bo.filetype)
If all else fails hopefully the logs can provide some insight. This plugin ships with logging, however it only includes errors by default.
To help debug your issue you'll need to go through the following steps:
- Update the log level to
debug
- Create a test file
- Generate logs from the test file
- Provide the logs in the issue
Change the plugin configuration to:
require('render-markdown').setup({
log_level = 'debug',
})
Create a new markdown
file locally with the following content:
# Heading
- Item
- Nested
> [!NOTE]
> A note
- [ ] Unchecked
- [x] Checked
To do this restart Neovim and open the markdown
file from the previous step.
This should trigger the render function by default, then close Neovim.
Logs are written to a file typically located at: ~/.local/state/nvim/render-markdown.log
.
Copy the contents of that file and paste it into the issue.