1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-02 16:09:46 +01:00
home-manager/tests/modules/programs/neovim/plugin-config.nix
Joosep Jääger de3758e31a
neovim: fix a typo in the generated init.lua (#3252)
neovim complains when having both an init.lua and an init.vim
2022-09-23 13:33:17 +02:00

35 lines
822 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.neovim = {
enable = true;
extraConfig = ''
" This 'extraConfig' should be present in vimrc
'';
plugins = with pkgs.vimPlugins; [
vim-nix
{
plugin = vim-commentary;
config = ''
" plugin-specific config
autocmd FileType c setlocal commentstring=//\ %s
autocmd FileType c setlocal comments=://
'';
}
];
extraLuaPackages = [ pkgs.lua51Packages.luautf8 ];
};
nmt.script = ''
vimrc="$TESTED/home-files/.config/nvim/init-home-manager.vim"
vimrcNormalized="$(normalizeStorePaths "$vimrc")"
assertFileExists "$vimrc"
assertFileContent "$vimrcNormalized" "${./plugin-config.vim}"
'';
};
}