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.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

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

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

Type: null or lua function string

Default: null

Declared by:

plugins.auto-save.debounceDelay

Saves the file at most every debounce_delay milliseconds.

Plugin default: 135

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

Default: null

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.

Plugin default: ["InsertLeave" "TextChanged"]

Type: null or (list of string)

Default: null

Declared by:

plugins.auto-save.writeAllBuffers

Write all buffers when the current one meets condition.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by: