Currently, we generate the lua code as soon as the value of the option
is not an empty attrs.
However, a case where the attrs only contains `null` values
(`nord_colorscheme = null; nord_foo = null;}` would pass the `if`
condition, but the generated lua table would still be empty because
`toLua` filters out those values.
Hence, we should directly check if the attrs would be translated to an
empty lua table or not to decide whether we should generate the lua
snippet or not.
Using mkOrder to ensure the options can be accessible to everything
throughout the config. Setting right below global table available, so
variables can reference stuff inside global table.
Problem: Some modules are setting empty strings to extraConfig* options
with the intention to not generate any config. But empty
strings are also values, so they are still concatenated in the
final value of extraConfig* options. This results in a
multiple empty strings in extraConfigs.
Solution: Avoid using optionalString when setting values to extraConfig*
options. Use mkIf instead.
This commit also fixes mkIf condition in autocmd module.
`mkNeovimPlugin` is a special case. To avoid evaluating
caller's arguments mkMerge/optionalAttrs pattern is used
instead.