bug: No specs found for module "plugins" (Structured Setup) #1875
-
Did you check docs and existing issues?
Neovim version (nvim -v)0.10.2 Operating system/versionFedora Workstation 40 Describe the bugI've followed the Installation instructions and chose 'Structured Setup'. After creating .config/nvim/init.lua and .config/nvim/lua/config/lazy.lua and running nvim it greets me with: Error detected while processing /home/me/.config/nvim/init.lua: :checkhealth lazy reports the issue again. I've tried the Single File Setup as well and the issue did not appear. Upon running a diff between the too I noticed that for the Structured Setup spec is populated with { import = "plugins" } : require("lazy").setup({ Maybe this could be a clue? Steps To Reproduce
Expected BehaviorStructured Setup should not produce the error: Reprovim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
-- add any other plugins here
},
}) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
just to be clear you created the plugins folder at ~/.config/nvim/lua/plugins/ |
Beta Was this translation helpful? Give feedback.
-
One of the biggest problems is that there is a lot of contradictory, outdated, or different ways to do things and unless one already knows, as simply chrislike, how it works, then it can be confusing because what isn't explained is the actual logic but just "Do as I say" logic. E.g., the logic isn't". When neovim starts it looks for the init.lua file in different paths on the system in this order[list of paths]. The init.lua file contains code that configures neovim further such as loading modules like LazyVim. A neovim module is a lua module file. It loads modules just like lua loads modules which is to use lua's require and specify the module name which is located in the paths configured for lua(see package.path). LazyVim then can load plugins using it's own unique format. It does this by calling setup and passing a table that specifies which pages to load. The point is that by explaining how things work than just giving examples(both are actually needed) it will make more sense for most people because they will know what is expected. Ultimately if it is not explained people will have to figure it out on their own and many will waste a lot of time doing so. E.g., Showing lua files and a directory structure isn't generally helpful if a person has no idea what it represents. If a person already knows then it's also generally useless. How most people learn this stuff for the first time is essentially by copy and paste and then slowly over time learn to modify things and get the gist of what is going on. The only problem with this is that it is very slow. The more a person can know something the more it empowers them and the less time wasted. Generally there is the fan out principle where if one person can do something better it will help everyone downstream exponentially. E.g., if it costs them 5 hours extra then it saves every single person, in theory, 5 hours. If there are n people that is 5*n hours saved. 1000 people = 5000 hours saved. Then each of those people have more time to work on improving things and saving time for those people downstream of them. Then it is n^2, and so on. But it also feeds back on itself since everyone upstream is also downstream. E.g., if someone saved you 5 hours from doing something then you have 5 hours free to actually use to save everyone downstream of you 5 hours. Since they will have more free time it means that they will have more time to build better tools and systems which you then will use and benefit from. I'm not complaining, I'm just explaining ;) Things are much better than they were 20 years ago and they will continue to improve. But the more people are aware of what is needed(correct explanations that are are not ambiguous, too shallow, or too deep) and realize they benefit from helping then things become more productive and efficient. Hopefully this will lead to more free time for people to do other things they want to do which then branches out in different directions leading to more things. |
Beta Was this translation helpful? Give feedback.
https://lazy.folke.io/usage/structuring provides documentation of where you can go from here