1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-09 10:31:08 +01:00

treewide: remove with lib;

This commit is contained in:
Gaetan Lepage 2025-12-07 12:28:40 +01:00 committed by Gaétan Lepage
parent cd0443e166
commit 629f9d75f8
67 changed files with 276 additions and 338 deletions

View file

@ -3,11 +3,12 @@
pkgs,
...
}:
with lib;
let
renamedServers = import ./_renamed.nix;
unsupportedServers = lib.importJSON ../../../generated/unsupported-lspconfig-servers.json;
inherit (lib) mkOption types;
lspExtraArgs = {
dartls = {
settingsOptions = import ./dartls-settings.nix { inherit lib; };
@ -56,7 +57,9 @@ let
settings = cfg: { nixd = cfg; };
settingsOptions = import ./nixd-settings.nix { inherit lib; };
extraConfig = cfg: {
extraPackages = optional (cfg.settings.formatting.command == [ "nixpkgs-fmt" ]) pkgs.nixpkgs-fmt;
extraPackages = lib.optional (
cfg.settings.formatting.command == [ "nixpkgs-fmt" ]
) pkgs.nixpkgs-fmt;
};
};
omnisharp = {
@ -180,7 +183,7 @@ let
};
};
extraConfig = cfg: {
filetype.extension = mkIf (cfg.enable && cfg.autoSetFiletype) { v = "vlang"; };
filetype.extension = lib.mkIf (cfg.enable && cfg.autoSetFiletype) { v = "vlang"; };
};
};
volar = {
@ -249,7 +252,7 @@ in
"lsp"
"servers"
];
renameModules = mapAttrsToList (
renameModules = lib.mapAttrsToList (
old: new: lib.mkRenamedOptionModule (baseLspPath ++ [ old ]) (baseLspPath ++ [ new ])
) renamedServers;
unsupportedModules = map (