Commit graph

7 commits

Author SHA1 Message Date
Gaetan Lepage
ec24d496d5 treewide (cleaning): helpers.toLuaObject -> lib.nixvim.toLuaObject 2024-12-15 21:55:51 +00:00
Gaetan Lepage
ed30fd8588 modules/opts: fix code generation condition to prevent false positives
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.
2024-11-20 16:30:09 +01:00
Austin Horstman
1c9ba58aef
modules: cleanup with lib 2024-09-03 22:12:33 -05:00
Austin Horstman
8a272143ee
modules/opts: move options to top of init.lua
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.
2024-08-24 11:50:06 -05:00
Stanislav Asunkin
9317537848 modules: avoid setting empty strings to extraConfig* options
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.
2024-07-22 23:18:53 +02:00
traxys
62f32bfc71 treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
Matt Sturgeon
4f83bcf290
Rename options to avoid confusion with module options (#1324) 2024-03-29 21:58:44 +01:00
Renamed from modules/options.nix (Browse further)