plugins.render-markdown.settings
Options provided to the require('render-markdown').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
bullet = {
icons = [
"◆ "
"• "
"• "
];
right_pad = 1;
};
code = {
above = " ";
below = " ";
border = "thick";
language_pad = 2;
left_pad = 2;
position = "right";
right_pad = 2;
sign = false;
width = "block";
};
heading = {
border = true;
icons = [
"1 "
"2 "
"3 "
"4 "
"5 "
"6 "
];
position = "inline";
sign = false;
width = "full";
};
render_modes = true;
signs = {
enabled = false;
};
}
Declared by:
plugins.render-markdown.settings.enabled
This lets you set whether the plugin should render documents from the start or not.
Useful if you want to use a command like RenderMarkdown enable
to start rendering documents
rather than having it on by default.
There are ways to accomplish the same thing with the lazy.nvim
cmd
option, the point of
this feature is to be plugin manager agnostic.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.render-markdown.settings.debounce
This is meant to space out how often this plugin parses the content of the viewport in milliseconds to avoid causing too much lag while scrolling & editing.
For example if you hold j
once you’ve scrolled far enough down you’ll notice that there is
no longer any rendering happening.
Only once you’ve stopped scrolling for this debounce time will the plugin parse the viewport
and update the marks.
If you don’t mind the lag or have a really fast system you can reduce this value to make the
plugin feel snappier.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 100
Declared by:
plugins.render-markdown.settings.injections
This plugin works by iterating through the language trees of the current buffer and adding
marks for handled languages such as markdown
.
For standard markdown
files this is the entire file, however for other filetypes this
may be only specific sections.
This option allows users to define these sections within the plugin configuration as well as allowing this plugin to provide logical defaults for a “batteries included” experience.
Type: null or (attribute set of (anything or raw lua code))
Default:
null
Plugin default:
{
gitcommit = {
enabled = true;
query = ''
((message) @injection.content
(#set! injection.combined)
(#set! injection.include-children)
(#set! injection.language "markdown"))
'';
};
}
Declared by:
plugins.render-markdown.settings.max_file_size
The maximum file size that this plugin will attempt to render in megabytes.
This plugin only does rendering for what is visible within the viewport so the size of the file does not directly impact its performance. However large files in general are laggy enough hence this feature.
The size is only checked once when the file is opened and not after every update, so a file that grows larger than this in the process of editing will continue to be rendered.
Type: null or floating point number
Default:
null
Plugin default: 10.0
Declared by:
plugins.render-markdown.settings.preset
Allows you to set many different non default options with a single value. You can view the values for these here.
Type: null or string or raw lua code
Default:
null
Plugin default: "none"
Declared by:
plugins.render-markdown.settings.win_options
Window options are used by the plugin to set different window level neovim option values when rendering and when not rendering a file.
This is useful for 2 reasons:
- To allow options for rendering to be controlled by the plugin configuration so users don’t need to set global or ftplugin options to make things work.
- Some option values are more useful for appearance and others are more useful while editing.
Type: null or (attribute set of ((attribute set of anything) or raw lua code))
Default:
null
Plugin default:
{
concealcursor = {
default = {
__raw = "vim.api.nvim_get_option_value('concealcursor', {})";
};
rendered = "";
};
conceallevel = {
default = {
__raw = "vim.api.nvim_get_option_value('conceallevel', {})";
};
rendered = 3;
};
}
Declared by: