go.nvim icon indicating copy to clipboard operation
go.nvim copied to clipboard

vim.notify freezes when plugin updated via lazy.nvim

Open yogeshlonkar opened this issue 11 months ago • 0 comments

I use lazy.nvim with below plugin config

  {
    'ray-x/go.nvim',
    lazy = true,
    event = 'BufRead',
    ft = {'go', 'gomod'},
    dependencies = {'ray-x/guihua.lua'},
    build = function() require('go.install').update_all_sync() end,
    config = function()
      -- some config commands
    end,
  },

Every time go.nvim is updated

  • nvim freezes for few minutes
  • few notifications of  INFO install ... slowly start appearing from left
  • after a minute or two reset of the notifications appear and nvim starts behaving normally

this is due to nvim-notify and update_all_sync not playing well with each other

If I use update_all in build

+     build = function() require('go.install').update_all() end,
-     build = function() require('go.install').update_all_sync() end

everything works good.

I don't have issue using update_all but this was annoying me for couple of months and it would be good if there is a option/ flag to disable vim.notify in plugin

yogeshlonkar avatar Feb 29 '24 21:02 yogeshlonkar