plugins.debugprint.settings

Options provided to the require('debugprint').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  commands = {
    delete_debug_prints = "DeleteDebugPrints";
    toggle_comment_debug_prints = "ToggleCommentDebugPrints";
  };
  display_counter = true;
  display_snippet = true;
  filetypes = {
    python = {
      left = "print(f'";
      mid_var = "{";
      right = "')";
      right_var = "}')";
    };
  };
  keymaps = {
    normal = {
      variable_above = "g?V";
      variable_above_alwaysprompt = {
        __raw = "nil";
      };
      variable_below = "g?v";
      variable_below_alwaysprompt = {
        __raw = "nil";
      };
    };
    visual = {
      variable_above = "g?V";
      variable_below = "g?v";
    };
  };
  move_to_debugline = false;
  print_tag = "DEBUGPRINT";
}

Declared by:

plugins.debugprint.settings.commands

By default, the plugin will create some commands for use ‘out of the box’. There are also some function invocations which are not mapped to any commands by default, but could be. This can be overridden using this option.

You only need to include the commands which you wish to override, others will default as shown in the documentation. Setting any command to nil (warning: use __raw) will skip it.

Plugin default:

{
  toggle_comment_debug_prints = "ToggleCommentDebugPrints";
  delete_debug_prints = "DeleteDebugPrints";
}

Type: null or (attribute set of (string or raw lua code))

Default: null

Declared by:

plugins.debugprint.settings.display_counter

Whether to display/include the monotonically increasing counter in each debug message.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.debugprint.settings.display_snippet

Whether to include a snippet of the line above/below in plain debug lines.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.debugprint.settings.keymaps

By default, the plugin will create some keymappings for use ‘out of the box’. There are also some function invocations which are not mapped to any keymappings by default, but could be. This can be overridden using this option.

You only need to include the keys which you wish to override, others will default as shown in the documentation. Setting any key to nil (warning: use __raw) will skip it.

The default keymappings are chosen specifically because ordinarily in NeoVim they are used to convert sections to ROT-13, which most folks don’t use.

Plugin default:

{
  normal = {
    plain_below = "g?p";
    plain_above = "g?P";
    variable_below = "g?v";
    variable_above = "g?V";
    variable_below_alwaysprompt.__raw = "nil";
    variable_above_alwaysprompt.__raw = "nil";
    textobj_below = "g?o";
    textobj_above = "g?O";
    toggle_comment_debug_prints.__raw = "nil";
    delete_debug_prints.__raw = "nil";
  };
  visual = {
    variable_below = "g?v";
    variable_above = "g?V";
  };
}

Type: null or (attribute set of ((attribute set of (string or raw lua code)) or raw lua code))

Default: null

Declared by:

plugins.debugprint.settings.move_to_debugline

When adding a debug line, moves the cursor to that line.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.debugprint.settings.print_tag

The string inserted into each print statement, which can be used to uniquely identify statements inserted by debugprint.

Plugin default: "DEBUGPRINT"

Type: null or string or raw lua code

Default: null

Declared by: