1
0
mirror of https://github.com/nix-community/home-manager synced 2024-07-05 21:03:27 +02:00
home-manager/tests/modules/programs/neovim/no-init.nix
Matthieu Coudron bd83eab622
programs.neovim: default to init.lua (#3233)
We change the current logic: instead of writing an init.vim which loads
lua/init-home-manager.lua, we write an init.lua that sources init.vim

This commit also avoids writing any of these files if the plugins have
no config.
2022-09-22 10:39:55 +02:00

26 lines
612 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.neovim = {
enable = true;
vimAlias = true;
withNodeJs = false;
withPython3 = true;
withRuby = false;
extraPython3Packages = (ps: with ps; [ jedi pynvim ]);
# plugins without associated config should not trigger the creation of init.vim
plugins = with pkgs.vimPlugins; [ fugitive ({ plugin = vim-sensible; }) ];
};
nmt.script = ''
nvimFolder="home-files/.config/nvim"
assertPathNotExists "$nvimFolder/init.vim"
assertPathNotExists "$nvimFolder/init.lua"
'';
};
}