Skip to content
Discussion options

You must be logged in to vote

Two things are going on here:

  1. With lazy.nvim, mason is lazy-loaded in your setup (VeryLazy/cmd), and in headless mode VeryLazy never fires, so the :Mason* commands don't exist yet. You can load it explicitly with +Lazy! load mason.nvim first.
  2. Even once it's loaded, :MasonUpdate only updates the registry (the list of available versions), not the installed tools. It doesn't take a ! either.

There's no built-in "upgrade everything" command, but the registry API makes it a one-liner. This refreshes the registry, then reinstalls only the packages whose installed version differs from the latest:

nvim --headless '+Lazy! load mason.nvim' '+MasonUpdate' \
  '+lua local names = {} for _, p in ipa…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by jessefarinacci
Comment options

You must be logged in to vote
1 reply
@XNinety9
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants