programs.neovim: fix tests + swap extraConfig and pluginconfig (#2053)
makes more sense to have extraConfig afterwards in case use want to override config
This commit is contained in:
parent
9e253a8c30
commit
2a4ab0d891
|
@ -51,8 +51,8 @@ let
|
||||||
(map (x: if x ? plugin && x.optional == true then x.plugin else null)
|
(map (x: if x ? plugin && x.optional == true then x.plugin else null)
|
||||||
cfg.plugins);
|
cfg.plugins);
|
||||||
};
|
};
|
||||||
customRC = cfg.extraConfig
|
customRC = pkgs.lib.concatMapStrings pluginConfig cfg.plugins
|
||||||
+ pkgs.lib.concatMapStrings pluginConfig cfg.plugins;
|
+ cfg.extraConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraMakeWrapperArgs = lib.optionalString (cfg.extraPackages != [ ])
|
extraMakeWrapperArgs = lib.optionalString (cfg.extraPackages != [ ])
|
||||||
|
|
|
@ -24,11 +24,11 @@ with lib;
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
vimrc="$TESTED/home-files/.config/nvim/init.vim"
|
vimrc="$TESTED/home-files/.config/nvim/init.vim"
|
||||||
|
${pkgs.perl}/bin/perl -pe "s|\Q$NIX_STORE\E/[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" < "$vimrc" > $out/generated.vim
|
||||||
assertFileExists home-files/.config/nvim/init.vim
|
assertFileExists home-files/.config/nvim/init.vim
|
||||||
# We need to remove the unkown store paths in the config
|
# We need to remove the unkown store paths in the config
|
||||||
TESTED="" assertFileContent \
|
TESTED="" assertFileContent \
|
||||||
<( ${pkgs.perl}/bin/perl -pe "s|\Q$NIX_STORE\E/[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" < "$vimrc"
|
$out/generated.vim \
|
||||||
) \
|
|
||||||
"${./plugin-config.vim}"
|
"${./plugin-config.vim}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,10 +4,10 @@ set nocompatible
|
||||||
set packpath^=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vim-pack-dir
|
set packpath^=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vim-pack-dir
|
||||||
set runtimepath^=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vim-pack-dir
|
set runtimepath^=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vim-pack-dir
|
||||||
|
|
||||||
" This should be present in vimrc
|
|
||||||
" vim-commentary {{{
|
" vim-commentary {{{
|
||||||
" This should be present too
|
" This should be present too
|
||||||
autocmd FileType c setlocal commentstring=//\ %s
|
autocmd FileType c setlocal commentstring=//\ %s
|
||||||
autocmd FileType c setlocal comments=://
|
autocmd FileType c setlocal comments=://
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
" This should be present in vimrc
|
||||||
|
|
Loading…
Reference in a new issue