neovim: fix tests (#3147)

https://github.com/NixOS/nixpkgs/pull/184364 broke the tests

Closes #3146

Signed-off-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
Sumner Evans 2022-08-15 08:41:57 -06:00 committed by GitHub
parent ff5133843c
commit 688e5c85b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 21 deletions

View file

@ -55,15 +55,6 @@ let
};
};
# A function to get the configuration string (if any) from an element of 'plugins'
pluginConfig = p:
if p ? plugin && (p.config or "") != "" then ''
" ${p.plugin.pname or p.plugin.name} {{{
${p.config}
" }}}
'' else
"";
allPlugins = cfg.plugins ++ optional cfg.coc.enable {
type = "viml";
plugin = cfg.coc.package;
@ -394,12 +385,10 @@ in {
home.packages = [ cfg.finalPackage ];
xdg.configFile."nvim/init.vim" = mkIf (neovimConfig.neovimRcContent != "") {
text = if hasAttr "lua" config.programs.neovim.generatedConfigs then
neovimConfig.neovimRcContent + ''
lua require('init-home-manager')''
else
neovimConfig.neovimRcContent;
text = neovimConfig.neovimRcContent + (optionalString
(hasAttr "lua" config.programs.neovim.generatedConfigs) ''
lua require('init-home-manager')
'');
};
xdg.configFile."nvim/lua/init-home-manager.lua" =
mkIf (hasAttr "lua" config.programs.neovim.generatedConfigs) {

View file

@ -1,10 +1,4 @@
set packpath^=/nix/store/00000000000000000000000000000000-vim-pack-dir
set runtimepath^=/nix/store/00000000000000000000000000000000-vim-pack-dir
" vim-commentary {{{
" This should be present too
autocmd FileType c setlocal commentstring=//\ %s
autocmd FileType c setlocal comments=://
" }}}
" This should be present in vimrc