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:
parent
bd83eab622
commit
de3758e31a
2 changed files with 6 additions and 5 deletions
|
@ -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; };
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue