plugins.persisted.settings

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

Type: attribute set of anything

Default: { }

Example:

{
  autoload = true;
  on_autoload_no_session = {
    __raw = ''
      function()
        vim.notify("No existing session to load.")
      end
    '';
  };
  use_git_branch = true;
}

Declared by:

plugins.persisted.settings.allowed_dirs

List of dirs that the plugin will start and autoload from.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.persisted.settings.autoload

Whether to automatically load the session for the cwd on Neovim startup.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.persisted.settings.autostart

Whether to automatically start the plugin on load.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.persisted.settings.follow_cwd

Whether to change the session file to match any change in the cwd.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.persisted.settings.ignored_dirs

List of dirs that are ignored for starting and autoloading.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.persisted.settings.on_autoload_no_session

Function to run when autoload = true but there is no session to load.

@type fun(): any

Type: null or raw lua code

Default: null

Plugin default: lib.nixvim.mkRaw "function() end"

Declared by:

plugins.persisted.settings.save_dir

Directory where session files are saved.

Type: null or string or raw lua code

Default: null

Plugin default: lib.nixvim.mkRaw "vim.fn.expand(vim.fn.stdpath('data') .. '/sessions/')"

Declared by:

plugins.persisted.settings.should_save

Function to determine if a session should be saved.

@type fun(): boolean

Type: null or raw lua code

Default: null

Plugin default: lib.nixvim.mkRaw "function()\n return true\nend\n"

Declared by:

plugins.persisted.settings.use_git_branch

Whether to include the git branch in the session file name.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by: