There are some codepaths out there in the wild that seem to be
explicitly setting a buffer at build time. I'm not convinced that's a
sane thing to do, but I don't have time to dig any further right now.
See the discussion starting here:
https://github.com/nix-community/nixvim/pull/2712#issuecomment-2556330101
for more context.
This feels more correct to me: I believe we were registering a keymap
for all buffers, even if only some of them have experienced the relevant
autocmd.
I don't know if it's guaranteed here that `args.buf` always exists
(but maybe it's not a problem if it doesn't exist, because we'll still
register a keymap for all buffers?).
This fixes https://github.com/nix-community/nixvim/issues/2711
- Replace nullable lua option with a no-default option.
- Made it so the deprecated option is only declared when `lua = true` is passed.
- Replace `normalizeMappings` with a `removeDeprecatedMapAttrs` helper.
- Added warnings for all options that historically had `lua` support.
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.
This represents a major rearchitecture for nixvim, so I'm leaving this up to track the progress for now, and to serve as a reference for any breaking changes during transition.
The main change is, of course, being able to use nixvim standalone. To do this, you should use the new build function, which takes in two arguments: the system architecture (e.g. x86_64-linux) and the configuration. For the new configuration, do not use the programs.nixvim. prefix.
For module development, the main change is that you should no longer prefix your modules with programs.nixvim..