make my own auto save the auto-save plugin is being weird
This commit is contained in:
parent
2063357974
commit
9bce2b0d42
5 changed files with 33 additions and 27 deletions
|
@ -1,23 +0,0 @@
|
|||
return {
|
||||
"Pocco81/auto-save.nvim",
|
||||
event = "BufEnter",
|
||||
opts = {
|
||||
execution_message = {
|
||||
message = function()
|
||||
return ""
|
||||
end,
|
||||
},
|
||||
trigger_events = { "InsertLeave", "TextChanged", "TextChangedI", "BufLeave" },
|
||||
condition = function(buf)
|
||||
local disallowed_filetypes = { "TelescopePrompt", "quickfix", "terminal" }
|
||||
local utils = require("auto-save.utils.data")
|
||||
if
|
||||
vim.fn.getbufvar(buf, "&modifiable") == 1
|
||||
and utils.not_in(vim.fn.getbufvar(buf, "&filetype"), disallowed_filetypes)
|
||||
then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue