The name of the hook.
The callback function which is given environment variables.
Runs a hook invoking all registered callbacks with the given environment variables.
Callbacks will be invoked synchronously and in the order in which they were registered.
Adds the given callback to the list of callbacks for the given hook and returns a function that removes the hook again when called.
The callback will be invoked when the hook it is registered for is run. Hooks are usually directly run by a highlight function but you can also run hooks yourself.
One callback function can be registered to multiple hooks.
A callback function must not be registered for the same hook multiple times. Doing so will cause undefined behavior. However, registering a callback again after removing it is fine.