plugins.neoclip.settings

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

Type: attribute set of anything

Default: { }

Example:

{
  content_spec_column = false;
  default_register = "\"";
  filter = null;
  keys = {
    fzf = {
      custom = { };
      paste = "ctrl-l";
      paste_behind = "ctrl-h";
      select = "default";
    };
    telescope = {
      i = {
        custom = { };
        paste = "<c-l>";
        paste_behind = "<c-h>";
        select = "<cr>";
      };
      n = {
        custom = { };
        paste = "p";
        paste_behind = "P";
        select = "<cr>";
      };
    };
  };
  on_paste = {
    set_reg = false;
  };
  preview = true;
}

Declared by:

plugins.neoclip.settings.enable_macro_history

If true (default) any recorded macro will be saved, see macros.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.neoclip.settings.enable_persistent_history

If set to true the history is stored on VimLeavePre using sqlite.lua and lazy loaded when querying.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.neoclip.settings.content_spec_column

Can be set to true to use instead of the preview.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.neoclip.settings.continuous_sync

If set to true, the runtime history is synced with the persistent storage everytime it’s changed or queried.

If you often use multiple sessions in parallel and wants the history synced you might want to enable this.

Off by default; it can cause delays because the history file is written everytime you yank something. Although, in practice no real slowdowns were noticed.

Alternatively see db_pull and db_push functions in the README.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.neoclip.settings.db_path

The path to the sqlite database to store history if enable_persistent_history=true. Defaults to $XDG_DATA_HOME/nvim/databases/neoclip.sqlite3.

Type: null or string or raw lua code

Default: null

Plugin default:

{
  __raw = "vim.fn.stdpath('data') .. '/databases/neoclip.sqlite3'";
}

Declared by:

plugins.neoclip.settings.default_register

What register to use by default when not specified (e.g. Telescope neoclip). Can be a string such as "\"" (single register) or a table of strings such as ["\"" "+" "*"].

Type: null or string or list of string

Default: null

Plugin default: "\""

Declared by:

plugins.neoclip.settings.default_register_macros

What register to use for macros by default when not specified (e.g. Telescope macroscope).

Type: null or string or raw lua code

Default: null

Plugin default: "q"

Declared by:

plugins.neoclip.settings.disable_keycodes_parsing

If set to true, macroscope will display the internal byte representation, instead of a proper string that can be used in a map.

So a macro like "one<CR>two" will be displayed as "one\ntwo". It will only show the type and number of lines next to the first line of the entry.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.neoclip.settings.filter

A function to filter what entries to store (default all are stored). This function filter should return true (include the yanked entry) or false (don’t include it) based on a table as the only argument, which has the following keys:

  • event: The event from TextYankPost (see ``:help TextYankPost` for which keys it contains).
  • filetype: The filetype of the buffer where the yank happened.
  • buffer_name: The name of the buffer where the yank happened.

Type: null or lua function string

Default: null

Plugin default: null

Declared by:

plugins.neoclip.settings.history

The max number of entries to store.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: 1000

Declared by:

plugins.neoclip.settings.length_limit

The max number of characters of an entry to be stored (default 1MiB). If the length of the yanked string is larger than the limit, it will not be stored.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: 1048576

Declared by:

plugins.neoclip.settings.preview

Whether to show a preview (default) of the current entry or not. Useful for for example multiline yanks. When yanking the filetype is recorded in order to enable correct syntax highlighting in the preview.

NOTE: in order to use the dynamic title showing the type of content and number of lines you need to configure telescope with the dynamic_preview_title = true option.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.neoclip.settings.prompt

The prompt string used by the picker (telescope/fzf-lua).

Type: null or string or raw lua code

Default: null

Plugin default: null

Declared by: