vimPlugins: automate non-generated plugin calls

Move the non-generated plugins to using a function call that iterates
over the folders in the non-generated directory so we don't need them in
overrides.nix
This commit is contained in:
Austin Horstman
2025-03-25 08:34:02 -05:00
parent 944f6a9e57
commit eec836cd7d
2 changed files with 7 additions and 42 deletions
@@ -27,6 +27,12 @@ let
inherit buildVimPlugin;
};
nonGeneratedPlugins =
self: super:
lib.mapAttrs (name: _: callPackage (./non-generated + "/${name}") { }) (
lib.filterAttrs (name: type: type == "directory") (builtins.readDir ./non-generated)
);
plugins = callPackage ./generated.nix {
inherit buildVimPlugin;
inherit (neovimUtils) buildNeovimPlugin;
@@ -49,6 +55,7 @@ lib.pipe initialPackages [
(extends plugins)
(extends luaPackagePlugins)
(extends nodePackagePlugins)
(extends nonGeneratedPlugins)
(extends overrides)
(extends aliases)
lib.makeExtensible
@@ -229,8 +229,6 @@ in
];
};
avante-nvim = callPackage ./non-generated/avante-nvim { };
aw-watcher-vim = super.aw-watcher-vim.overrideAttrs {
patches = [
(replaceVars ./patches/aw-watcher-vim/program_paths.patch {
@@ -298,8 +296,6 @@ in
meta.homepage = "https://github.com/sblumentritt/bitbake.vim/";
};
blink-cmp = callPackage ./non-generated/blink-cmp { };
blink-cmp-copilot = super.blink-cmp-copilot.overrideAttrs {
dependencies = [ self.copilot-lua ];
};
@@ -320,8 +316,6 @@ in
dependencies = [ self.blink-cmp ];
};
blink-pairs = callPackage ./non-generated/blink-pairs { };
bluloco-nvim = super.bluloco-nvim.overrideAttrs {
dependencies = [ self.lush-nvim ];
};
@@ -378,8 +372,6 @@ in
];
};
clangd_extensions-nvim = callPackage ./non-generated/clangd_extensions-nvim { };
clang_complete = super.clang_complete.overrideAttrs {
# In addition to the arguments you pass to your compiler, you also need to
# specify the path of the C++ std header (if you are using C++).
@@ -431,8 +423,6 @@ in
];
};
cmp-async-path = callPackage ./non-generated/cmp-async-path { };
cmp-beancount = super.cmp-beancount.overrideAttrs {
checkInputs = [ self.nvim-cmp ];
};
@@ -753,8 +743,6 @@ in
'';
};
codesnap-nvim = callPackage ./non-generated/codesnap-nvim { };
codewindow-nvim = super.codewindow-nvim.overrideAttrs {
dependencies = [ self.nvim-treesitter ];
};
@@ -880,8 +868,6 @@ in
];
};
cord-nvim = callPackage ./non-generated/cord-nvim { };
cornelis = super.cornelis.overrideAttrs {
dependencies = [ self.vim-textobj-user ];
opt = [ self.vim-which-key ];
@@ -1289,8 +1275,6 @@ in
configurePhase = "cd plugins/nvim";
};
gitlab-vim = callPackage ./non-generated/gitlab-vim { };
gitlinker-nvim = super.gitlinker-nvim.overrideAttrs {
dependencies = [ self.plenary-nvim ];
};
@@ -1373,8 +1357,6 @@ in
];
};
hare-vim = callPackage ./non-generated/hare-vim { };
harpoon = super.harpoon.overrideAttrs {
dependencies = [ self.plenary-nvim ];
};
@@ -1521,8 +1503,6 @@ in
'';
};
LanguageClient-neovim = callPackage ./non-generated/LanguageClient-neovim { };
LazyVim = super.LazyVim.overrideAttrs {
# Any other dependency is optional
dependencies = [ self.lazy-nvim ];
@@ -1708,8 +1688,6 @@ in
dependencies = [ self.plenary-nvim ];
};
lsp_lines-nvim = callPackage ./non-generated/lsp_lines-nvim { };
ltex_extra-nvim = super.ltex_extra-nvim.overrideAttrs {
# Other modules require setup call first
nvimRequireCheck = "ltex_extra";
@@ -1899,8 +1877,6 @@ in
];
};
moveline-nvim = callPackage ./non-generated/moveline-nvim { };
multicursors-nvim = super.multicursors-nvim.overrideAttrs {
dependencies = with self; [
nvim-treesitter
@@ -2360,8 +2336,6 @@ in
dependencies = [ self.nvim-dap ];
};
nvim-dbee = callPackage ./non-generated/nvim-dbee { };
nvim-FeMaco-lua = super.nvim-FeMaco-lua.overrideAttrs {
dependencies = [ self.nvim-treesitter ];
};
@@ -2426,8 +2400,6 @@ in
dependencies = [ self.nvim-java-core ];
};
nvim-julia-autotest = callPackage ./non-generated/nvim-julia-autotest { };
nvim-lsp-file-operations = super.nvim-lsp-file-operations.overrideAttrs {
dependencies = [ self.plenary-nvim ];
};
@@ -2502,8 +2474,6 @@ in
nvimSkipModule = "snippets.utils.cmp";
};
nvim-spectre = callPackage ./non-generated/nvim-spectre { };
nvim-surround = super.nvim-surround.overrideAttrs {
# Optional treesitter integration
nvimSkipModule = "nvim-surround.queries";
@@ -2824,8 +2794,6 @@ in
quicker-nvim = super.quicker-nvim.overrideAttrs {
};
rainbow-delimiters-nvim = callPackage ./non-generated/rainbow-delimiters-nvim { };
range-highlight-nvim = super.range-highlight-nvim.overrideAttrs {
dependencies = [ self.cmd-parser-nvim ];
};
@@ -2927,8 +2895,6 @@ in
dependencies = [ self.nui-nvim ];
};
sg-nvim = callPackage ./non-generated/sg-nvim { };
skim = buildVimPlugin {
pname = "skim";
inherit (skim) version;
@@ -3005,8 +2971,6 @@ in
];
};
sniprun = callPackage ./non-generated/sniprun { };
# The GitHub repository returns 404, which breaks the update script
Spacegray-vim = buildVimPlugin {
pname = "Spacegray.vim";
@@ -3639,8 +3603,6 @@ in
passthru.python3Dependencies = ps: with ps; [ beancount ];
};
vim-clap = callPackage ./non-generated/vim-clap { };
vim-codefmt = super.vim-codefmt.overrideAttrs {
dependencies = [ self.vim-maktaba ];
};
@@ -3771,8 +3733,6 @@ in
'';
};
vim-markdown-composer = callPackage ./non-generated/vim-markdown-composer { };
vim-matchup = super.vim-matchup.overrideAttrs {
# Optional treesitter integration
nvimSkipModule = "treesitter-matchup.third-party.query";
@@ -3818,8 +3778,6 @@ in
dependencies = [ self.vim-repeat ];
};
vim-stationeers-ic10-syntax = callPackage ./non-generated/vim-stationeers-ic10-syntax { };
vim-stylish-haskell = super.vim-stylish-haskell.overrideAttrs (old: {
postPatch =
old.postPatch or ""