-
I have some plugins which have very small require('lazy').setup({
-- Show colours around hex code ------------------
{
'NvChad/nvim-colorizer.lua',
config = function()
require('config/plugins/general/misc')
end,
},
-- Highlight cursorline during jump ---------------
{
'edluffy/specs.nvim',
config = function()
require('config/plugins/general/misc')
end,
},
}) This was working in I get the following error: loop or previous error loading module 'config/plugins/general/misc' Are such configurations not allowed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Lazy.nvim will load a plugin on In your setup, I think the following happens:
You could refactor the You can also use the Best regards! |
Beta Was this translation helpful? Give feedback.
Lazy.nvim will load a plugin on
require
.In your setup, I think the following happens:
nvim-colorizer
requiresmisc
,misc
also contains arequire
onspecs.nvim
, triggeringspecs.nvim
to loadspecs.nvim
requiresmisc
againYou could refactor the
misc
module to contain dedicated functions, which can be called from the config functions in the spec. As a benefit, thepcalls
are not needed anymore.You can also use the
import
functionality oflazy.nvim
. Themisc
module could just return a list ofspecs
. See LazyVim for inspiration.Best regards!