From 8b751a2fbf006c5b9a4546b382f03d098fcee9fe Mon Sep 17 00:00:00 2001 From: Smirnov Oleksandr Date: Sun, 13 Nov 2022 14:17:37 +0200 Subject: [PATCH] refactor(installer): move requires inside of function --- lua/gopher/installer.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/gopher/installer.lua b/lua/gopher/installer.lua index 355562b..fdd6242 100644 --- a/lua/gopher/installer.lua +++ b/lua/gopher/installer.lua @@ -1,5 +1,3 @@ -local Job = require "plenary.job" -local u = require "gopher._utils" local urls = { gomodifytags = "github.com/fatih/gomodifytags", impl = "github.com/josharian/impl", @@ -10,6 +8,9 @@ local urls = { ---@param pkg string local function install(pkg) + local Job = require "plenary.job" + local u = require "gopher._utils" + local url = urls[pkg] .. "@latest" Job:new({