Skip to content

Disable auto install and uninstalled plugins notify. #1421

Answered by wroyca
Song-Tianxiang asked this question in Q&A
Discussion options

You must be logged in to vote

I have set opts.install.missing = false for require('lazy').setup(). As doc said, it disabled auto install of missing plugins, but when I enter neovim, I got error message:

Error detected while processing /home/stx/.config/nvim/init.lua:                           
Plugin XXXX is not installed 

How to disable plugin auto install and without the error message.

You can monkey patch the function, e.g.

local Util = require("lazy.core.util")

function Util.error(msg, opts)
  opts = opts or {}
  opts.level = vim.log.levels.ERROR
  if string.find(msg, "installed") then 
    return
  end
  Util.notify(msg, opts)
end

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Song-Tianxiang
Comment options

Answer selected by Song-Tianxiang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants