Confusion over ensure_installed mechanism #1781
-
|
I'm setting up a minimal nvim config using lazy.nvim but not LazyVim. I need prettier. I looked at how LazyVim was doing it and tried to use: That would install mason but not prettier. I tried to track down where this ensure_installed property was run, and couldn't find references in mason, nor in lazy.nvim. Only in LazyVim, mason-lsp and treesitter. Are there some implicit plugin dependencies required to have this ensure_installed property honored? Is this just ad-hoc code I shouldn't try to duplicate? I ended up doing this which works fine: Other question, is there anything that prevents lazy.nvim from installing prettier? Why do we need 2 package managers? Thanks in advance for the clarifications! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Mason does not have a |
Beta Was this translation helpful? Give feedback.
Mason does not have a
ensure_installedproperty by default. LazyVim just creates an internal tableensure_installedin Masonoptsand then inconfigfunction it uses it to iterate over that table and install packages using the Mason API. Relevant code here.