Skip to content

Startuptime optimization: don't eager load module in plugin/ #25

Description

@tuurep

See :h lua-plugin-lazy

  • Keep plugin/<name>.lua small, avoid eagerly calling require() on modules
    until a command or mapping is actually used.

So I think what would be ideal for startuptime would be this:

Question: I've always wondered what the effect of requiring the same lua module on every use of the command is, but based on everything I've read, that's how it should be done?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions