mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 20:43:15 +00:00
bd83eab622
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.
25 lines
612 B
Nix
25 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"
|
|
'';
|
|
};
|
|
}
|