mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
misc: allow null in extraPackages
This commit is contained in:
parent
c826d146c6
commit
f2f97d844b
13 changed files with 22 additions and 39 deletions
|
@ -36,9 +36,6 @@ with lib;
|
|||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
extraPackages =
|
||||
optional
|
||||
(cfg.godotPackage != null)
|
||||
cfg.godotPackage;
|
||||
extraPackages = [cfg.godotPackage];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
extraPackages = optional (cfg.leanPackage != null) cfg.leanPackage;
|
||||
extraPackages = [cfg.leanPackage];
|
||||
|
||||
extraConfigLua = let
|
||||
setupOptions = with cfg;
|
||||
|
|
|
@ -48,7 +48,7 @@ with helpers.vim-plugin;
|
|||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
extraPackages = optional (cfg.ledgerPackage != null) cfg.ledgerPackage;
|
||||
extraPackages = [cfg.ledgerPackage];
|
||||
};
|
||||
|
||||
settingsOptions = {
|
||||
|
|
|
@ -133,7 +133,7 @@ in {
|
|||
};
|
||||
config = mkIf cfg.enable {
|
||||
extraPlugins = with pkgs.vimPlugins; [nvim-lspconfig cfg.package];
|
||||
extraPackages = optional (cfg.serverPackage != null) cfg.serverPackage;
|
||||
extraPackages = [cfg.serverPackage];
|
||||
|
||||
plugins.lsp.postConfig = let
|
||||
options =
|
||||
|
|
|
@ -238,10 +238,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
|
||||
extraPackages =
|
||||
optional
|
||||
(cfg.rustAnalyzerPackage != null)
|
||||
cfg.rustAnalyzerPackage;
|
||||
extraPackages = [cfg.rustAnalyzerPackage];
|
||||
|
||||
plugins.lsp.postConfig = let
|
||||
globalOptions = with cfg;
|
||||
|
|
|
@ -213,12 +213,11 @@ in {
|
|||
if cfg.nixGrammars
|
||||
then [(cfg.package.withPlugins (_: cfg.grammarPackages))]
|
||||
else [cfg.package];
|
||||
extraPackages = with pkgs;
|
||||
[
|
||||
tree-sitter
|
||||
nodejs
|
||||
]
|
||||
++ optional (cfg.gccPackage != null) cfg.gccPackage;
|
||||
extraPackages = with pkgs; [
|
||||
tree-sitter
|
||||
nodejs
|
||||
cfg.gccPackage
|
||||
];
|
||||
|
||||
opts = mkIf cfg.folding {
|
||||
foldmethod = "expr";
|
||||
|
|
|
@ -87,11 +87,9 @@ with lib;
|
|||
.${cfg.settings.view_method}
|
||||
or [];
|
||||
in
|
||||
(
|
||||
optional
|
||||
(cfg.texlivePackage != null)
|
||||
[
|
||||
cfg.texlivePackage
|
||||
)
|
||||
]
|
||||
++ viewerPackages;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue