From 4acadc3ae4e43a024f33e1647012b0309c20d79e Mon Sep 17 00:00:00 2001 From: newbieQQ Date: Wed, 10 Jun 2026 22:58:26 +0800 Subject: [PATCH] refactor: go.nvim build checks for go binary before installing tools --- lua/plugs/dev.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/plugs/dev.lua b/lua/plugs/dev.lua index 58e242b..6d6fe05 100644 --- a/lua/plugs/dev.lua +++ b/lua/plugs/dev.lua @@ -17,7 +17,11 @@ return { "nvim-treesitter/nvim-treesitter", }, ft = { "go", 'gomod' }, - build = ':lua require("go.install").update_all_sync()', + build = function() + if vim.fn.executable('go') == 1 then + require("go.install").update_all_sync() + end + end, config = function() require("go").setup() end,