programs.neovim: write config in $XDG_CONFIG_HOME/init.vim (#1652)

* 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
This commit is contained in:
Matthieu Coudron 2020-12-29 20:26:02 +01:00 committed by GitHub
parent 99f0074362
commit 8e0c1c55fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 12 deletions

View file

@ -23,9 +23,8 @@ with lib;
};
nmt.script = ''
vimrc=$(grep -Po "(?<=-u )[^ ]*" < "${
builtins.toJSON config.programs.neovim.finalPackage
}/bin/nvim")
vimrc="$TESTED/home-files/.config/nvim/init.vim"
assertFileExists home-files/.config/nvim/init.vim
# We need to remove the unkown store paths in the config
TESTED="" assertFileContent \
<( ${pkgs.perl}/bin/perl -pe "s|\Q$NIX_STORE\E/[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" < "$vimrc"