Closed kylo252 closed 2 years ago
i'm a bit conflicted, it's a silly name (i am hilariously bad at naming things lol) but the opts.opts
table is meant to indicate that those options are opt ional :)
imo that makes it easier to copy+paste code around without reading docs
perhaps it would be more apt to rename the parent opts
table config
or something?
but the
opts.opts
table is meant to indicate that those options are opt ional :)
I get what you mean but they're already part of opts
imo that makes it easier to copy+paste code around without reading docs
It still is in this case, I don't see how that is changing that part.
perhaps it would be more apt to rename the parent
opts
tableconfig
or something?
The better approach from a refactoring pov, would be to rename the entire opts
table, which is an unfortunate name since it's not really optional. but now we'd be really introducing a breaking change for everyone, so I'm thinking you mean dashboard.opts.config
instead of dashboard.opts.opts
. In that case, I thought about calling it global_opts
instead.
i was thinking dashboard.config.opts
i was thinking
dashboard.config.opts
Yeah, but that's the bigger breaking change that I was talking about, it would require a deprecation notice and I'm not exactly sure how to handle it on the fly instead of just bailing out and telling the user to use the new syntax.
To be clear, I'm in favor of your suggestion.
well, we could export opts = config
, which would avoid any damage to the end user i think. then a migration plan would look like
opts
with config
in the docsopts
is used opts
with a breaking!
commit so packer users are notified
Breaking:
opts.opts.FOO
is now accessed directly withopts.FOO
insteadThis was mainly used with some options, such as
noautocmd
andmargin
The main benefits of this change is clarity and shorter/simpler parsing.