[1/4] Refactor: plugins: Add seperate config for each plugins
first commit of Refactor handle require errors move config from other places to proper files don't create a pseudo config function for no reason https://github.com/siduck76/NvChad/pull/156#issuecomment-881453546
This commit is contained in:
27
lua/plugins/autosave.lua
Normal file
27
lua/plugins/autosave.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
-- autosave.nvim plugin disabled by default
|
||||
local autosave
|
||||
if
|
||||
not pcall(
|
||||
function()
|
||||
func = require "autosave"
|
||||
end
|
||||
)
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
autosave.setup(
|
||||
{
|
||||
enabled = vim.g.auto_save, -- takes boolean value from init.lua
|
||||
execution_message = "autosaved at : " .. vim.fn.strftime("%H:%M:%S"),
|
||||
events = {"InsertLeave", "TextChanged"},
|
||||
conditions = {
|
||||
exists = true,
|
||||
filetype_is_not = {},
|
||||
modifiable = true
|
||||
},
|
||||
write_all_buffers = true,
|
||||
on_off_commands = true,
|
||||
clean_command_line_interval = 2500
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user