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.

Plugin default:

{
  basic = true;
  extra = true;
}

Type: null or value false (singular enum) or (submodule)

Default: null

Declared by:

plugins.comment.settings.padding

Add a space b/w comment and the line.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

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.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by: