plugins.telescope.extensions.undo.settings

settings for the undo telescope extension.

Type: attribute set of anything

Default: { }

Example:

{
  diff_context_lines = 8;
  entry_format = "state #$ID";
  mappings = {
    i = {
      "<c-cr>" = "require('telescope-undo.actions').restore";
      "<cr>" = "require('telescope-undo.actions').yank_additions";
      "<s-cr>" = "require('telescope-undo.actions').yank_deletions";
    };
    n = {
      Y = "require('telescope-undo.actions').yank_deletions";
      u = "require('telescope-undo.actions').restore";
      y = "require('telescope-undo.actions').yank_additions";
    };
  };
  side_by_side = true;
  time_format = "!%Y-%m-%dT%TZ";
  use_custom_command = [
    "bash"
    "-c"
    "echo '$DIFF' | delta"
  ];
  use_delta = true;
}

Declared by:

plugins.telescope.extensions.undo.settings.diff_context_lines

Defaults to the scrolloff.

Plugin default: vim.o.scrolloff

Type: null or lua code string or (unsigned integer, meaning >=0)

Default: null

Declared by:

plugins.telescope.extensions.undo.settings.entry_format

The format to show on telescope for the different versions of the file.

Plugin default: "state #$ID, $STAT, $TIME"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.telescope.extensions.undo.settings.side_by_side

If set to true tells delta to render diffs side-by-side. Thus, requires delta to be used. Be aware that delta always uses its own configuration, so it might be that you’re getting the side-by-side view even if this is set to false.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.telescope.extensions.undo.settings.time_format

Can be set to a Lua date format string.

Plugin default: ""

Type: null or string or raw lua code

Default: null

Declared by:

plugins.telescope.extensions.undo.settings.use_custom_command

Should be in this format: [ "bash" "-c" "echo '$DIFF' | delta" ]

Type: null or (list of string)

Default: null

Declared by:

plugins.telescope.extensions.undo.settings.use_delta

When set to true, delta is used for fancy diffs in the preview section. If set to false, telescope-undo will not use delta even when available and fall back to a plain diff with treesitter highlights.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by: