Skip to content
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

feat: use config from _G.packer_plugins in packer_compiled.lua #1096

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

younger-1
Copy link
Contributor

@younger-1 younger-1 commented Oct 16, 2022

Since plugins's config is in config field of _G.packer_plugins, we could use it directly if the type of config field is fnction. Otherwise, the compiled config string could be appear twice in packer_compiled.lua.

Result:

-- Config for: monokai.nvim
time([[Config for monokai.nvim]], true)
try_loadstring(_G.packer_plugins["monokai.nvim"].config[1], "config", "monokai.nvim")
time([[Config for monokai.nvim]], false)

This doesn't impact if the type of config field is string, so it works as expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants