This commit is contained in:
thek4n 2024-05-22 13:35:53 +03:00
parent f0945e885e
commit cd88354c40

View File

@ -5,7 +5,7 @@ return {
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it) enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
execution_message = { execution_message = {
message = function() -- message to print on save message = function() -- message to print on save
return "" return ""
end, end,
dim = 0.18, -- dim the color of `message` dim = 0.18, -- dim the color of `message`
cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea
@ -15,9 +15,10 @@ return {
local fn = vim.fn local fn = vim.fn
local utils = require("auto-save.utils.data") local utils = require("auto-save.utils.data")
if if
fn.getbufvar(buf, "&modifiable") == 1 and fn.getbufvar(buf, "&modifiable") == 1 and
utils.not_in(fn.getbufvar(buf, "&filetype"), {}) then utils.not_in(fn.getbufvar(buf, "&filetype"), {})
return true -- met condition(s), can save then
return true -- met condition(s), can save
end end
return false -- can't save return false -- can't save
end, end,
@ -32,4 +33,4 @@ return {
} }
}) })
end end
} }