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.

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

Default: null

Plugin default:

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

Declared by:

plugins.debugprint.settings.display_counter

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

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.debugprint.settings.display_snippet

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

Type: null or boolean or raw lua code

Default: null

Plugin default: true

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.

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

Default: null

Plugin default:

{
  normal = {
    delete_debug_prints = {
      __raw = "nil";
    };
    plain_above = "g?P";
    plain_below = "g?p";
    textobj_above = "g?O";
    textobj_below = "g?o";
    toggle_comment_debug_prints = {
      __raw = "nil";
    };
    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";
  };
}

Declared by:

plugins.debugprint.settings.move_to_debugline

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

Type: null or boolean or raw lua code

Default: null

Plugin default: false

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.

Type: null or string or raw lua code

Default: null

Plugin default: "DEBUGPRINT"

Declared by: