fixed chadrc string overrides calling default function parameter. Added ability to use function as config override

pull/737/head
zbirenbaum 2 years ago committed by siduck
parent bccd8e4ab9
commit 4077ff3520

@ -247,14 +247,17 @@ end
-- if 3rd arg not given, then return "require('plugins.configs.telescope')"
-- if override is a table, mark set the override flag for the default config to true
-- override flag being true tells the plugin to call tbl_override_req as part of configuration
M.override_req = function(name, default_config, config_function)
local override, apply_table_override =
require("core.utils").load_config().plugins.default_plugin_config_replace[name], "false"
local result = default_config
if type(override) == "string" and override ~= "" then
result = override
return "require('" .. override .. "')"
elseif type(override) == "table" then
apply_table_override = "true"
elseif type(override) == "function" then
return override
end
result = "('" .. result .. "')"

Loading…
Cancel
Save