You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.9.0 release
Operating system/version
Arch Linux (also verified on Windows and Mac OS X)
Describe the bug
It appears when I set up Mason.nvim and use the build key along with the built in setup (either config = function() ... end/opts = {...}/config = true), it causes some errors with the cache_loader specifically if I am also importing other plugins with import = ....
I'm not sure what is causing this error in the code base, but it looks like if I remove the setup stuff by removing config and/or opts then the error goes away, if I remove the entry in the plugins table that does import = ... then the error also goes away.
Note: This also seems to only happen when I start from a completely clean environment, cleared out state/cache/data folders and everything. After the first start up the error goes away.
Error:
Error detected while processing /home/micah/.config/nvim_lazy-bug/init.lua:
Failed to run `config` for mason.nvim
/home/micah/.config/nvim_lazy-bug/init.lua:23: module 'mason' not found:
^Ino field package.preload['mason']
cache_loader: module mason not found
cache_loader_lib: module mason not found
^Ino file './mason.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/mason.lua'
^Ino file '/usr/local/share/lua/5.1/mason.lua'
^Ino file '/usr/local/share/lua/5.1/mason/init.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/mason.lua'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/mason/init.lua'
^Ino file './mason.so'
^Ino file '/usr/local/lib/lua/5.1/mason.so'
^Ino file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/mason.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
# stacktrace:
- ~/.config/nvim_lazy-bug/init.lua:23 _in_ **config**
- ~/.config/nvim_lazy-bug/init.lua:29
Steps To Reproduce
Use the minimal reproducing Lua file below
Make sure you are in a clean environment, clear out the state/data/cache folders (using the reproduction file below, just run rm -rf .repo)
run nvim and wait for lazy to install packages
run :messages to see the full message
Expected Behavior
There shouldn't be an error inside of the masonconfig function should not have any issue loading the package and accessing it with require("mason").
Repro
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs { "config", "data", "state", "cache" } dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system { "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath }
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
{
"williamboman/mason.nvim",
build=":MasonUpdate", -- must have build command and config to setup packageconfig=function(_, opts) require("mason").setup(opts) end,
},
"AstroNvim/astrocommunity", -- also must import some plugin specifications from somewhere
{ import="astrocommunity.colorscheme.catppuccin" },
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme"tokyonight"
The text was updated successfully, but these errors were encountered:
Thanks so much for the quick fix! Us over at AstroNvim really appreciate all your work with Lazy ❤️ Sorry again for a bit of the noise that was created earlier before the bug was properly identified and understood.
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9.0 release
Operating system/version
Arch Linux (also verified on Windows and Mac OS X)
Describe the bug
It appears when I set up Mason.nvim and use the
build
key along with the built in setup (eitherconfig = function() ... end
/opts = {...}
/config = true
), it causes some errors with thecache_loader
specifically if I am also importing other plugins withimport = ...
.I'm not sure what is causing this error in the code base, but it looks like if I remove the setup stuff by removing
config
and/oropts
then the error goes away, if I remove the entry in the plugins table that doesimport = ...
then the error also goes away.Note: This also seems to only happen when I start from a completely clean environment, cleared out state/cache/data folders and everything. After the first start up the error goes away.
Error:
Steps To Reproduce
state
/data
/cache
folders (using the reproduction file below, just runrm -rf .repo
)nvim
and wait for lazy to install packages:messages
to see the full messageExpected Behavior
There shouldn't be an error inside of the
mason
config
function should not have any issue loading the package and accessing it withrequire("mason")
.Repro
The text was updated successfully, but these errors were encountered: