mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-22 03:35:21 +02:00
plugins: use mk{Neovim,Vim}Plugin's dependencies parameter
This commit is contained in:
parent
b66559d8ef
commit
1a64636839
49 changed files with 147 additions and 207 deletions
|
@ -253,6 +253,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
})
|
||||
];
|
||||
|
||||
dependencies = lib.map (name: {
|
||||
inherit name;
|
||||
enable = !config.plugins.treesitter.nixGrammars;
|
||||
}) buildGrammarDeps;
|
||||
|
||||
settingsOptions = {
|
||||
auto_install = helpers.defaultNullOpts.mkBool false ''
|
||||
Whether to automatically install missing parsers when entering a buffer.
|
||||
|
@ -456,13 +461,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
pkg: pkg.withPlugins (_: cfg.grammarPackages)
|
||||
);
|
||||
|
||||
# These deps are required to build grammars when not using `nixGrammars`:
|
||||
dependencies = lib.mkIf (!cfg.nixGrammars) (
|
||||
lib.genAttrs buildGrammarDeps (_: {
|
||||
enable = lib.mkDefault true;
|
||||
})
|
||||
);
|
||||
|
||||
warnings = lib.nixvim.mkWarnings "plugins.treesitter" (
|
||||
lib.map (packageName: {
|
||||
when = !cfg.nixGrammars && !config.dependencies.${packageName}.enable;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue