diff --git a/lua/hurl/init.lua b/lua/hurl/init.lua index 9dda5e8..0663d95 100644 --- a/lua/hurl/init.lua +++ b/lua/hurl/init.lua @@ -15,6 +15,7 @@ local default_config = { height = 40, }, env_file = { 'vars.env' }, + find_env_files_in_folders = utils.find_env_files_in_folders, formatters = { json = { 'jq' }, html = { diff --git a/lua/hurl/main.lua b/lua/hurl/main.lua index 348a50b..f14212c 100644 --- a/lua/hurl/main.lua +++ b/lua/hurl/main.lua @@ -104,7 +104,7 @@ local function execute_hurl_cmd(opts, callback) -- Check vars.env exist on the current file buffer -- Then inject the command with --variables-file vars.env - local env_files = utils.find_env_files_in_folders() + local env_files = _HURL_GLOBAL_CONFIG.find_env_files_in_folders() for _, env in ipairs(env_files) do utils.log_info( 'hurl: looking for ' .. vim.inspect(_HURL_GLOBAL_CONFIG.env_file) .. ' in ' .. env.path