2020-10-12 00:22:58 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.neovim = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
2023-01-10 09:35:00 +00:00
|
|
|
let g:hmExtraConfig='HM_EXTRA_CONFIG'
|
2020-10-12 00:22:58 +00:00
|
|
|
'';
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
|
|
|
vim-nix
|
|
|
|
{
|
|
|
|
plugin = vim-commentary;
|
|
|
|
config = ''
|
2023-01-10 09:35:00 +00:00
|
|
|
let g:hmPlugins='HM_PLUGINS_CONFIG'
|
2020-10-12 00:22:58 +00:00
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
2023-01-10 09:35:00 +00:00
|
|
|
extraLuaPackages = [ pkgs.lua51Packages.luautf8 ];
|
2020-10-12 00:22:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nmt.script = ''
|
2023-01-10 09:35:00 +00:00
|
|
|
vimout=$(mktemp)
|
|
|
|
echo "redir >> /dev/stdout | echo g:hmExtraConfig | echo g:hmPlugins | redir END" \
|
|
|
|
| ${pkgs.neovim}/bin/nvim -es -u "$TESTED/home-files/.config/nvim/init.lua" \
|
|
|
|
> "$vimout"
|
|
|
|
assertFileContains "$vimout" "HM_EXTRA_CONFIG"
|
|
|
|
assertFileContains "$vimout" "HM_PLUGINS_CONFIG"
|
2020-10-12 00:22:58 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|