-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
plugin with opt option install start dir #1038
Comments
There are two types of plugin specs, Simple specs that are just a string and Complex ones that are a table containing optional values.
use({
'kristijanhusak/vim-dadbod-ui',
cmd = { 'DBUIToggle', 'DBUIAddConnection', 'DBUI', 'DBUIFindBuffer', 'DBUIRenameBuffer' },
config = conf.vim_dadbod_ui,
requires = {{'tpope/vim-dadbod', opt = true }},
}) |
I used this before. but i don't know this logic if its a table with opt. it should be in opt dir. why it must be work with table in table? also test with use({ 'plugin', opt = true})
|
@glepnir the original example for the issue description would probably never worked exactly right, i.e. it would likely have always been an issue. I think packer already goes overboard to provide loads of variations for input, e.g. you can supply The example you mention above is totally different. Packer would then have the fun job of disambiguating between an "object" or a "list" which tbh can be done with |
I agree with @akinsho, the |
If a function would become more complex. But there are still situations that cannot be handled. I'm more inclined to think that the design of this function is wrong . And I think it's a long-standing bug? It's just that I discovered it recently. I don't understand this logic. Because the function will get complicated without fixing the bug. Will judging these situations be complicated? I don't think so . Not a big deal. If you don't think it's necessary. I can close. Or I can make a plugin manager of my own. that would be a good start too requires = {"a/list", "of/strings"} or requires = "single/string" or requires = {{'more/complex', config = "blah"}, {'list/of', setup = 'foo'}} |
I'm not sure this logic is valid personally, I think if you invert this logic then every function that doesn't handle every scenario is wrong? Anyway I don't speak for packer, I was simply chiming in to suggest that this is to my mind a very minor issue, all you need to do is wrap the requires with If you want to make a plugin manager this is very much your prerogative, a bit tangential here though. If other people think this is worth fixing, then feel free to raise a PR. |
|
I agree with @akinsho and @EdenEast here: early influence on I took a look at a fix and it seemed simple enough without adding much more complexity to In general, I do want to slim |
@wbthomason I would like to help contribute to this cleanup / v2 effort. I am able to put resources into OSS and would like to contribute to packer. |
Thank you! I finally got around to writing a very first-draft roadmap for the rewrite: https://github.com/wbthomason/packer.nvim/blob/refactor/packer-v2/ROADMAP.md It needs fleshing out and probably other revisions, but hopefully this is enough to start a conversation on how others can help contribute to the rewrite effort. |
nvim --version
: latestgit --version
: latestSteps to reproduce
Actual behaviour
vim_dadobd
installed in start_dirExpected behaviour
install in opt_dir
The text was updated successfully, but these errors were encountered: