Expose the generated viml config, this has 2 advantages:
1/ user can choose to write the generated config to a file of its choice
2/ the user can prepend/append to the config before writing it
xdg.configFile."nvim/init.vim".text = ''
" prepend some config
${programs.neovim.generatedConfigViml}
" append some config
'';
NOTE: this was already possible with
xdg.configFile."nvim/init.vim" = mkMerge [
(mkBefore {
text = ''
" prepend some config
'';
})
(mkAfter {
text = ''
" append some config
'';
})
]
This adds two new options: 'programs.neovim.coc.{enable,settings}`.
These settings offer a simple interface over `xdg.configFile."nvim/coc-settings.json`,
using the standard Nix' syntax instead of a multiline string.
When installing plugins, Home Manager expects plugins (packages) to have
a `pname` attribute.
This is not always the case, so fallback to `name` if `pname` is unset.
The `configure` option is not type checked and an artifact of how
nixpkgs is implemented.
We now have the equivalent options in home-manager and managing
interactions between the 2 systems complexifies maintainance of the
module.
Please use the other options at your disposal:
configure.packages.*.opt -> programs.neovim.plugins = [ { plugin = ...; optional = true; }]
configure.packages.*.start -> programs.neovim.plugins = [ { plugin = ...; }]
configure.customRC -> programs.neovim.extraConfig
* neovim: write config in $XDG_CONFIG_HOME/init.vim
instead of wrapping the configuration, which has sideeffects
https://github.com/NixOS/nixpkgs/issues/55376
* fix: update test accordingly
* neovim: allow setting init.vim config alongside plugins
* neovim: add test for neovim plugins
* neovim: make pluginWithConfigType a have type submodule
The `programs.neovim.configure` option is consistent with NixOS's
`wrapNeovim` and offers features not supported by the `extraConfig`
and `plugins` option pair.
Closes#971