From 6676eb440c57bf69f0f51cd6802b3429c2c1b403 Mon Sep 17 00:00:00 2001 From: teto <886074+teto@users.noreply.github.com> Date: Thu, 8 Jan 2026 15:10:53 +0100 Subject: [PATCH] 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 --- pkgs/applications/editors/neovim/utils.nix | 18 +++++++++++------- pkgs/applications/editors/neovim/wrapper.nix | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix index 6a7d1f83573f..cc40709d5b9e 100644 --- a/pkgs/applications/editors/neovim/utils.nix +++ b/pkgs/applications/editors/neovim/utils.nix @@ -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; diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix index ef2372c54f34..c1c7fa4cdeba 100644 --- a/pkgs/applications/editors/neovim/wrapper.nix +++ b/pkgs/applications/editors/neovim/wrapper.nix @@ -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;