mirror of
https://github.com/nix-community/home-manager
synced 2024-12-27 20:29:47 +01:00
neovim: autogenerate config.lua file sourced to init.vim (#2716)
This commit is contained in:
parent
838d40d61a
commit
0b1745b4ef
1 changed files with 10 additions and 1 deletions
|
@ -376,8 +376,17 @@ in {
|
|||
home.packages = [ cfg.finalPackage ];
|
||||
|
||||
xdg.configFile."nvim/init.vim" = mkIf (neovimConfig.neovimRcContent != "") {
|
||||
text = neovimConfig.neovimRcContent;
|
||||
text = if hasAttr "lua" config.programs.neovim.generatedConfigs then
|
||||
neovimConfig.neovimRcContent + ''
|
||||
|
||||
lua require('init-home-manager')''
|
||||
else
|
||||
neovimConfig.neovimRcContent;
|
||||
};
|
||||
xdg.configFile."nvim/lua/init-home-manager.lua" =
|
||||
mkIf (hasAttr "lua" config.programs.neovim.generatedConfigs) {
|
||||
text = config.programs.neovim.generatedConfigs.lua;
|
||||
};
|
||||
xdg.configFile."nvim/coc-settings.json" = mkIf cfg.coc.enable {
|
||||
source = jsonFormat.generate "coc-settings.json" cfg.coc.settings;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue