Commit Graph
10 Commits
Author SHA1 Message Date
belamu fee8f33284 modules/opts: docs on difference between opts, global opts and local opts
These differences are clear for users that are well-versed in neovim
configuration but need a while to figure out for neovim newcomers.

Therefore I hope that they can help.
2026-07-06 14:40:11 +00:00
Matt Sturgeon 5ff549fdaf modules/opts: drop rename aliases 2026-06-08 02:02:43 +00:00
Matt Sturgeon dad19c1238 treewide: remove internal use of helpers module arg 2025-11-19 15:22:27 +00:00
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