plugins.auto-save.enable

Whether to enable auto-save.

Type: boolean

Default: false

Example: true

Declared by:

plugins.auto-save.enableAutoSave

Whether to start auto-save when the plugin is loaded.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.auto-save.package

Which package to use for the auto-save plugin.

Type: package

Default: <derivation vimplugin-auto-save.nvim-2024-04-25>

Declared by:

plugins.auto-save.condition

Function that determines whether to save the current buffer or not.

  • return true: if buffer is ok to be saved
  • return false: if it’s not ok to be saved

Type: null or lua function string

Default: null

Plugin default:

function(buf)
  local fn = vim.fn
  local utils = require("auto-save.utils.data")

  if
    fn.getbufvar(buf, "&modifiable") == 1 and utils.not_in(fn.getbufvar(buf, "&filetype"), {}) then
    return true -- met condition(s), can save
  end
  return false -- can't save
end

Declared by:

plugins.auto-save.debounceDelay

Saves the file at most every debounce_delay milliseconds.

Type: null or signed integer or floating point number or raw lua code

Default: null

Plugin default: 135

Declared by:

plugins.auto-save.extraOptions

These attributes will be added to the table parameter for the setup function. Typically, it can override NixVim’s default settings.

Type: attribute set of anything

Default: { }

Declared by:

plugins.auto-save.triggerEvents

Vim events that trigger auto-save. See :h events.

Type: null or (list of string)

Default: null

Plugin default: ["InsertLeave" "TextChanged"]

Declared by:

plugins.auto-save.writeAllBuffers

Write all buffers when the current one meets condition.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by: