4 files changed,
19 insertions(+),
5 deletions(-)
Author:
Smirnov Oleksandr
ss2316544@gmail.com
Committed by:
GitHub
noreply@github.com
Committed at:
2025-03-30 17:20:08 +0300
Parent:
ea28fc4
M
doc/gopher.nvim.txt
@@ -57,6 +57,9 @@ -- timeout for running internal commands
---@type number timeout = 2000, + --- timeout for running installer commands(e.g :GoDepsInstall, :GoDepsInstallSync) + installer_timeout = 999999, + -- user specified paths to binaries ---@class gopher.ConfigCommand commands = {
M
lua/gopher/_utils/init.lua
@@ -3,7 +3,7 @@ local log = require "gopher._utils.log"
local utils = {} ---@param msg string ----@param lvl? number +---@param lvl? number by default `vim.log.levels.INFO` function utils.notify(msg, lvl) lvl = lvl or vim.log.levels.INFO vim.notify(msg, lvl, {
M
lua/gopher/config.lua
@@ -25,6 +25,9 @@ -- timeout for running internal commands
---@type number timeout = 2000, + --- timeout for running installer commands(e.g :GoDepsInstall, :GoDepsInstallSync) + installer_timeout = 999999, + -- user specified paths to binaries ---@class gopher.ConfigCommand commands = {
M
lua/gopher/installer.lua
@@ -1,4 +1,4 @@
-local c = require("gopher.config").commands +local c = require "gopher.config" local r = require "gopher._utils.runner" local u = require "gopher._utils" local log = require "gopher._utils.log"@@ -30,14 +30,22 @@ end
---@param url string local function install(url) - r.async({ c.go, "install", url }, function(opt) + vim.schedule(function() + u.notify("go install-ing: " .. url) + end) + + r.async({ c.commands.go, "install", url }, function(opt) handle_intall_exit(opt, url) - end) + end, { timeout = c.installer_timeout }) end ---@param url string local function install_sync(url) - local rs = r.sync { c.go, "install", url } + vim.schedule(function() + u.notify("go install-ing: " .. url) + end) + + local rs = r.sync({ c.commands.go, "install", url }, { timeout = c.installer_timeout }) handle_intall_exit(rs, url) end