diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 735fb39..7199c89 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -1,5 +1,7 @@ local M = {} +local config = require("core.utils").load_config() + M.autopairs = function() local present1, autopairs = pcall(require, "nvim-autopairs") local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.cmp") @@ -23,7 +25,7 @@ M.autosave = function() end autosave.setup { - enabled = vim.g.auto_save or false, -- takes boolean value from init.lua + enabled = config.options.plugin.autosave, -- takes boolean value from chadrc.lua execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", events = { "InsertLeave", "TextChanged" }, conditions = { @@ -38,7 +40,6 @@ M.autosave = function() end M.better_escape = function() - local config = require("core.utils").load_config() vim.g.better_escape_interval = config.options.plugin.esc_insertmode_timeout or 300 end