neovimUtils.makeVimPackageInfo: follow up fixes
The wrong version of the PR got merged, missing a few reviewed points: - userPluginLua was actually viml - formatted doc for 'plugins' also changed the example for grug-far-nvim which is better IMO than far-vim
This commit is contained in:
@@ -68,10 +68,14 @@ let
|
||||
*/
|
||||
makeVimPackageInfo =
|
||||
# a list of neovim plugin derivations, for instance
|
||||
# plugins = [
|
||||
# { plugin=vimPlugins.far-vim; config = "let g:far#source='rg'"; optional = false; }
|
||||
# vimPlugins.vim-fugitive
|
||||
# ]
|
||||
# [
|
||||
# {
|
||||
# plugin = vimPlugins.grug-far-nvim;
|
||||
# config = "let g:grug_far = { 'startInInsertMode': v:false }";
|
||||
# optional = false;
|
||||
# }
|
||||
# vimPlugins.vim-fugitive
|
||||
# ]
|
||||
plugins:
|
||||
|
||||
let
|
||||
@@ -79,7 +83,7 @@ let
|
||||
|
||||
vimPackage = normalizedPluginsToVimPackage pluginsNormalized;
|
||||
|
||||
userPluginLua = lib.foldl (
|
||||
userPluginViml = lib.foldl (
|
||||
acc: p: if p.config != null then acc ++ [ p.config ] else acc
|
||||
) [ ] pluginsNormalized;
|
||||
|
||||
@@ -103,8 +107,8 @@ let
|
||||
# plugins' python dependencies
|
||||
inherit pluginPython3Packages;
|
||||
|
||||
# lua config set by the user along with the plugin
|
||||
inherit userPluginLua;
|
||||
# viml config set by the user along with the plugin
|
||||
inherit userPluginViml;
|
||||
|
||||
# recommanded configuration set in vim plugins ".passthru.initLua"
|
||||
inherit pluginAdvisedLua;
|
||||
|
||||
@@ -98,7 +98,7 @@ let
|
||||
|
||||
# we call vimrcContent without 'packages' to avoid the init.vim generation
|
||||
neovimRcContent' = lib.concatStringsSep "\n" (
|
||||
vimPackageInfo.userPluginLua ++ lib.optional (neovimRcContent != null) neovimRcContent
|
||||
vimPackageInfo.userPluginViml ++ lib.optional (neovimRcContent != null) neovimRcContent
|
||||
);
|
||||
|
||||
packpathDirs.myNeovimPackages = vimPackageInfo.vimPackage;
|
||||
|
||||
Reference in New Issue
Block a user