WIP on new config
This commit is contained in:
parent
c86f67f0f7
commit
c42f197307
13 changed files with 354 additions and 85 deletions
18
lua/plugins/editor_auto_save.lua
Normal file
18
lua/plugins/editor_auto_save.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
"Pocco81/auto-save.nvim",
|
||||
event = "BufEnter",
|
||||
opts = {
|
||||
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