plugins.comment.settings
Options provided to the require('Comment').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
ignore = "^const(.*)=(%s?)%((.*)%)(%s?)=>";
opleader = {
block = "gb";
line = "gc";
};
post_hook = ''
function(ctx)
if ctx.range.srow == ctx.range.erow then
-- do something with the current line
else
-- do something with lines range
end
end
'';
pre_hook = "require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook()";
toggler = {
block = "gbc";
line = "gcc";
};
}
Declared by:
plugins.comment.settings.ignore
Lines to be ignored while (un)comment.
Type: null or string or raw lua code
Default:
null
Declared by:
plugins.comment.settings.mappings
Enables keybindings. NOTE: If given ‘false’, then the plugin won’t create any mappings.
Type: null or value false (singular enum) or (submodule)
Default:
null
Plugin default:
{
basic = true;
extra = true;
}
Declared by:
plugins.comment.settings.padding
Add a space b/w comment and the line.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.comment.settings.post_hook
Lua function called after (un)comment.
Type: null or lua code string
Default:
null
Declared by:
plugins.comment.settings.pre_hook
Lua function called before (un)comment.
Type: null or lua code string
Default:
null
Declared by:
plugins.comment.settings.sticky
Whether the cursor should stay at its position.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by: