hooks.before_setup
and hooks.after_setup
functions.
These functions allow you to modify various aspects of Better Vim’s behavior
before and after the setup process.
hooks.before_setup
hooks.before_setup
function is called before the Better Vim setup process
begins. It serves as a hook where you can make modifications or override default
configurations. Here’s an example of how to use hooks.before_setup
:
hooks.before_setup
function is not that useful, but it is there if you need it.
hooks.after_setup
hooks.after_setup
function is called after the Better Vim setup process has
completed. It provides an opportunity to further customize or extend Better Vim’s
functionality. Here’s an example of how to use hooks.after_setup
:
hooks.after_setup
function, you can add additional configurations,
keybindings, or any other customization that you desire.
This allows you to enhance the default Better Vim setup with your own preferences
or extend it with additional features.
hooks
to
override defaults or add new configurations:
vim.api.nvim_set_keymap
within
hooks.after_setup
. The keybinding toggles line numbers when <Leader>l
is
pressed in normal mode.
my_custom_config.lua
is loaded using require
within hooks.after_setup
.
This allows you to separate your custom configurations into separate files for
better organization and load them only after all the Better Vim setup is done.