1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 02:39:45 +01:00
home-manager/tests/modules/programs/neovim/plugin-config.nix
Artem Shinkarov a3c18a60d5
neovim: add extraLuaPackages to neovim, fixes #1964. (#2617)
Similarly to extraPytonPackages, we add extraLuaPackages that make
lua libraries available at runtime.
2022-02-16 16:38:10 +01:00

35 lines
799 B
Nix

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