auto-save.nvim icon indicating copy to clipboard operation
auto-save.nvim copied to clipboard

Error than entering nvim

Open Bogdan-Torkhov opened this issue 2 years ago • 0 comments

Error detected while processing /home/deusbog/.local/share/nvim/plugged/auto-save.nvim/plugin/auto-save.lua: E5113: Error while calling lua chunk: ...share/nvim/plugged/auto-save.nvim/lua/auto-save/init.lua:100: unexpected event stack traceback: [C]: in function 'nvim_create_autocmd' ...share/nvim/plugged/auto-save.nvim/lua/auto-save/init.lua:100: in function 'on' ...l/share/nvim/plugged/auto-save.nvim/plugin/auto-save.lua:14: in main chunk Have these error than entering nvim. System:ubuntu 22.04,nvim 7.2 My config for plugin : require("auto-save").setup { enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it) execution_message = { message = function() -- message to print on save return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S")) end, dim = 0.18, -- dim the color of messagecleaning_interval = 1000, -- (milliseconds) automatically clean MsgArea after displayingmessage`. See :h MsgArea }, trigger_events = {"InsertLeave", "TextChanged", "BufNew", "BudLeave", "BufAdd", "BufDelete", "BufEnter", "UIEnter", "UILeave", "InsertChange", "InserEnter", "TabEnter", "TabLeave", "TabNew", "TabNewEntered", "TabClosed", "TermOpen", "TermEnter", "TermLeave", "TermClose", "TermResponse", "TextChanged", "TextChangedI", "TextChangedP", "VimEnter", "VimLeave", "VimResized", "VimResume", "VimSuspend", "WinClosed", "WinEnter", "WinLeave", "WinNew"}, condition = 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,
write_all_buffers = false, -- write all buffers when the current one meets `condition`
debounce_delay = 100, -- saves the file at most every `debounce_delay` milliseconds
callbacks = { -- functions to be executed at different intervals
	enabling = nil, -- ran when enabling auto-save
	disabling = nil, -- ran when disabling auto-save
	before_asserting_save = nil, -- ran before checking `condition`
	before_saving = nil, -- ran before doing the actual save
	after_saving = nil -- ran after doing the actual save

}

}`

Bogdan-Torkhov avatar Sep 28 '22 20:09 Bogdan-Torkhov