Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to move plugin configs to plugins/? #17

Closed
SPiCaRiA opened this issue Apr 7, 2024 · 1 comment
Closed

Not possible to move plugin configs to plugins/? #17

SPiCaRiA opened this issue Apr 7, 2024 · 1 comment

Comments

@SPiCaRiA
Copy link

SPiCaRiA commented Apr 7, 2024

Hi, I'm puzzled that moving plugin configs from lua/configs/ to lua/plugins/ breaks the profile and give me the error like (same error for all other plugin configs, I'm just listing one of them):

Invalid spec module: `plugins.lspconfig`                                                                                                           
Expected a `table` of specs, but a `boolean` was returned instead 

File structure after moving (basically just moving plugin configs to the same folder with plugins/init.lua:

.
├── init.lua
├── lazy-lock.json
├── LICENSE
└── lua/
   ├── chadrc.lua
   ├── configs/
   ├── mappings.lua
   ├── options.lua
   └── plugins/
      ├── cmp.lua
      ├── conform.lua
      ├── init.lua
      ├── lazy.lua
      └── lspconfig.lua

and I changed all the require statements in plugins/init.lua like this:

-- prev
require "configs.lspconfig"
-- now
require "plugins.lspconfig"

And the require statement in init.lua (but I didn't get any error about lazy.nvim's config, only specs of other plugins):

-- prev
local lazy_config = require "configs.lazy"
-- now
local lazy_config = require "plugins.lazy"

Appreciate for any information about how this may come from!

@siduck
Copy link
Member

siduck commented Apr 7, 2024

each file in plugins expects a table of plugin definitions in lazy syntax. Please dont move your lazy config into your plugins dir..... You should know how lazy imports work, lazy config is the config for lazy.nvim , its not a lazy spec :/

@siduck siduck closed this as completed Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants