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

README: make bootstrapping smoother #1248

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

Conversation

acid-bong
Copy link

@acid-bong acid-bong commented Jul 3, 2023

Actions in the execution order:

  1. if it's a bootstrap, the config stops executing after the plugins are used (taking packer.sync() out of packer.startup() ensures that they run in series): if there are plugin-specific options down the file, no user wants seeing errors for currently non-existent commands
  2. the bootstrap-only autocmd re-sources init.lua after PackerSync completes

The long windo command is more of an eyecandy: since on bootstrap the window with the file is completely undecorated (no line numbers and stuff), init.lua is sourced on all windows but the one created by PackerSync (I don't like how it looks with line numbers and a signcolumn on). Then the cursor is returned to that window by its ID.

Restriction: this snippet only works when in init.lua and not in a module (from where it's unable to stop parsing init.lua)

Actions in the execution order:

1) if it's a bootstrap, the config stops executing after the plugins are `use`d (taking packer.sync() out of packer.startup() ensures that they run in series): if there are plugin-specific options down the file, no user wants seeing errors for currently non-existent commands
2) the bootstrap-only autocmd re-sources init.lua after PackerSync completes

The long `windo` command is more of an eyecandy: since on bootstrap the window with the file is completely undecorated (no line numbers and stuff), init.lua is sourced on all windows but the one created by PackerSync (I don't like how it looks with line numbers and a signcolumn on). Then the cursor is returned to that window by its ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant