Replies: 5 comments 7 replies
-
If you want to use a plugins module then yes, you need to make those files according to the spec. You can have But if your current setup works, then you could use that too. Completely up to you |
Beta Was this translation helpful? Give feedback.
-
You could also write that example like this if that helps any/you prefer (in something like return {
"lewis6991/gitsigns.nvim",
event = "BufReadPre",
enabled = true, -- false if you want it 'inert'
config = function()
require("gitsigns").setup({
numhl = true,
signcolumn = false,
})
end
} |
Beta Was this translation helpful? Give feedback.
-
using |
Beta Was this translation helpful? Give feedback.
-
Just to close the circle here, I ended up changing my function get_setup(name)
return string.format('require("setup/%s")', name)
end Where with Lazy I have it like this (returning a function instead of a string): function get_setup(name)
return function()
require("setup." .. name)
end
end And that way I didn't need to rewrite/move any of my individual config files at the outset. |
Beta Was this translation helpful? Give feedback.
-
Attempting to migrate a Packer based config. Have a few questions:
Q1. Where, with Packer, I had individual files like this (plugins/gitsigns.lua):
Do I need to now refactor those to be like:
? Or is there a easier way to re-use the style of setup files I already have?
Q2. I notice in https://github.com/folke/dot/blob/master/config/nvim/lua/config/plugins/gitsigns.lua there are also keymappings in there. Is that needed over having a separate
mappings.lua
, or just a personal preference?Q3. With Packer, I have a number of
inert
files, which are the configs for plugins I might not have in use currently (the setups for other colorschemes for example). Are those inert files safe to live in theplugins
folder? Or should they be moved elsewhere?Thanks for any pionters.
Beta Was this translation helpful? Give feedback.
All reactions