modules/dependencies: add typst

This commit is contained in:
Gaetan Lepage 2025-04-07 17:10:53 +02:00 committed by nix-infra-bot
parent 8458a6c6f1
commit cfb56d1ed3
3 changed files with 11 additions and 11 deletions

View file

@ -19,6 +19,7 @@ let
example = "pkgs.nodejs_22"; example = "pkgs.nodejs_22";
}; };
tree-sitter.default = "tree-sitter"; tree-sitter.default = "tree-sitter";
typst.default = "typst";
ueberzug.default = "ueberzugpp"; ueberzug.default = "ueberzugpp";
which.default = "which"; which.default = "which";
}; };

View file

@ -1,7 +1,6 @@
{ {
lib, lib,
helpers, helpers,
pkgs,
... ...
}: }:
with lib; with lib;
@ -20,13 +19,15 @@ lib.nixvim.plugins.mkVimPlugin {
"concealMath" "concealMath"
"autoCloseToc" "autoCloseToc"
]; ];
imports = [
# TODO: added 2025-04-07, remove after 25.05
(lib.nixvim.mkRemovedPackageOptionModule {
plugin = "typst-vim";
packageName = "typst";
})
];
extraOptions = { extraOptions = {
# Add the typst compiler to nixvim packages
typstPackage = lib.mkPackageOption pkgs "typst" {
nullable = true;
};
keymaps = { keymaps = {
silent = mkOption { silent = mkOption {
type = types.bool; type = types.bool;
@ -39,7 +40,7 @@ lib.nixvim.plugins.mkVimPlugin {
}; };
extraConfig = cfg: { extraConfig = cfg: {
extraPackages = [ cfg.typstPackage ]; dependencies.typst.enable = lib.mkDefault true;
keymaps = keymaps =
with cfg.keymaps; with cfg.keymaps;

View file

@ -22,9 +22,7 @@
}; };
no-packages = { no-packages = {
plugins.typst-vim = { plugins.typst-vim.enable = true;
enable = true; dependencies.typst.enable = false;
typstPackage = null;
};
}; };
} }