This applies to all
init.lua fields except those that expect specific
definitions such as
For most use cases, supplying a table is more than enough for supplying your own configuration changes to a default table. This is done by simply providing a new table and we merge the table with the default table where the user table takes precedence.
For example, the
plugins table can be used to add new plugins to be
installed along side the default plugins:
For adding new key mappings and updating which-key menu, the
mapping table is used to extend existing configuration.
There may be cases where you want to have more control over the default tables
when overriding them. For these situations we also provide the ability to use a
function that takes one parameter (the default table) and returns a new table
to be used in it’s place. This method is a lot more advanced and requires
knowledge of the Lua programming language.
For example with the
options table, you may want to use the function notation to unset a default option that we set: