-
-
Notifications
You must be signed in to change notification settings - Fork 108
how do you include local plugins during dev? #181
Comments
@molleweide Hmm can you please explain me a bit more about this? Maybe send a link as a reference 👀 |
Look here at how here how he first checks for local plugs and prioritizes those over packer installed modules. https://github.com/folke/dot/blob/master/config/nvim/lua/util/packer.lua I want to get into plugin dev and the goal would be to have an option in the config file where you specify the path where your plugins are, eg. I note that Folke's structure of the plugin config is a little bit different so I have to understand how it can be integrated and this is a bit difficult for me. Folke is the guy who build |
accidentally closed |
Here function(use)
-----[[------------]]-----
--- Essentials ---
-----]]------------[[-----
-- Plugins manager
use({
"wbthomason/packer.nvim",
opt = true,
})
....
.... in doom. function M.setup(config, fn)
-- HACK: see https://github.com/wbthomason/packer.nvim/issues/180
vim.fn.setenv("MACOSX_DEPLOYMENT_TARGET", "10.15")
M.bootstrap()
local packer = require("packer")
packer.init(config)
M.local_plugins = config.local_plugins or {}
return packer.startup({
function(use)
use = M.wrap(use)
fn(use)
end,
})
end
return M |
Hmm alright so folke does this so packer will not spit his cleaning window, right? I think this could be dead simple since end user just needs to use a fullpath to his plugin, e.g. use({
"/home/user/Development/Nvim/foo.nvim",
config = function()
-- some good stuff here
end
}) Lemme know if I'm misunderstanding it :p |
wait maybe you can do it that simple. I didn't know that but in that case you could add them in user plugins right? |
Yeah this should work as expected IMO
Hmm right so this could supposes a problem, I don't know nor think that packer is smart enough to deal with this other than telling you that X plugin definition is duplicated 🤔 |
Yeah and I believe this is the problem that folke is fixing. That is why it could be nice with something similar to his functionality, and it seems that he has done all of the work already. Could you explain to me where |
No i avtually think that it would require some more thought in order to do this. I need to read through doom source more thouroughly first |
Brainstorming: paths and dirs:user creates a, eg. strategies:folke strategy - list local plugins you want
inverted folke - list local plugins you DON'T want
pre/post fix
use all
configs
(i pasted this from norg so it lookes a bit wierd. i need to keep issues/github ideas in markdown from now on) |
Hey, thanks for this. I think folke's approach is the most easier one for us, less logic and code to be written 👀 For configurations it looks great, first point is gonna be hard because you know lol, packer acts in some weird ways sometimes IMO, however I'll try to hack it :p Btw what do you think if we leave this feature for Doom v3.3? The reason of this proposal is because v3.2 is almost done and I want to release it asap to stable branch because it has some very important changes (like using cmp instead of compe) and some other neat features and improvements. Regards |
lol of course we can wait for vesion 3.3 :D I am just documenting stuff as fast as I can. There is absolutely no stress at all. |
Idea: modules/init For each plug use bool var So that if one wants, one can quickly toggle btw local and remote version Then it would also be nice to put big LOCAL next to plugin when packer syncing/status |
Would it make sense to put a dir like modules/config/local where u can put your local configs with higher priority, or maybe this should reside in doom root like doom-nvim/local |
there should also be a bool so you can toggle autoreloading currently worked on plugin or something. I just found plenary has reload func: EDIT: I realize that this might already be implemented in the reloader module, but atm |
I am looking into adapting Folke's pattern for automatically including local plugins and then creating a
set_local_plugins_path
indoom_config.lua
The text was updated successfully, but these errors were encountered: