1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

neovim: fix a typo in the generated init.lua (#3252)

neovim complains when having both an init.lua and an init.vim
This commit is contained in:
Joosep Jääger 2022-09-23 11:33:17 +00:00 committed by GitHub
parent bd83eab622
commit de3758e31a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -365,13 +365,14 @@ in {
in mkMerge (
# writes runtime
(map (x: x.runtime) pluginsNormalized) ++ [{
"nvim/init.vim" = mkIf (neovimConfig.neovimRcContent != "") {
text = neovimConfig.neovimRcContent;
};
"nvim/init-home-manager.vim" =
mkIf (neovimConfig.neovimRcContent != "") {
text = neovimConfig.neovimRcContent;
};
"nvim/init.lua" = let
luaRcContent =
lib.optionalString (neovimConfig.neovimRcContent != "")
"vim.cmd.source ${config.xdg.configHome}/nvim/init.vim"
"vim.cmd [[source ${config.xdg.configHome}/nvim/init-home-manager.vim]]"
+ lib.optionalString hasLuaConfig
config.programs.neovim.generatedConfigs.lua;
in mkIf (luaRcContent != "") { text = luaRcContent; };

View file

@ -24,7 +24,7 @@ with lib;
};
nmt.script = ''
vimrc="$TESTED/home-files/.config/nvim/init.vim"
vimrc="$TESTED/home-files/.config/nvim/init-home-manager.vim"
vimrcNormalized="$(normalizeStorePaths "$vimrc")"
assertFileExists "$vimrc"