mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
modules/dependencies: add tinymist
This commit is contained in:
parent
ada40e0f74
commit
8333fe8ecb
2 changed files with 15 additions and 5 deletions
|
@ -28,6 +28,7 @@ let
|
|||
example = "pkgs.nodejs_22";
|
||||
};
|
||||
texpresso.default = "texpresso";
|
||||
tinymist.default = "tinymist";
|
||||
tree-sitter.default = "tree-sitter";
|
||||
typst.default = "typst";
|
||||
ueberzug.default = "ueberzugpp";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
|
@ -10,24 +11,32 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
imports = [
|
||||
# TODO: added 2025-04-07, remove after 25.05
|
||||
(lib.nixvim.mkRemovedPackageOptionModule {
|
||||
plugin = "typst-preview";
|
||||
packageName = "tinymist";
|
||||
})
|
||||
];
|
||||
|
||||
extraOptions = {
|
||||
tinymistPackage = lib.mkPackageOption pkgs "tinymist" {
|
||||
nullable = true;
|
||||
};
|
||||
websocatPackage = lib.mkPackageOption pkgs "websocat" {
|
||||
nullable = true;
|
||||
};
|
||||
};
|
||||
extraConfig = cfg: {
|
||||
extraPackages = [
|
||||
cfg.tinymistPackage
|
||||
cfg.websocatPackage
|
||||
];
|
||||
|
||||
dependencies.tinymist.enable = lib.mkDefault true;
|
||||
|
||||
plugins.typst-preview.settings = {
|
||||
# Disable automatic downloading of binary dependencies
|
||||
dependencies_bin = {
|
||||
tinymist = lib.mkIf (cfg.tinymistPackage != null) (lib.mkDefault (lib.getExe cfg.tinymistPackage));
|
||||
tinymist = lib.mkIf config.dependencies.tinymist.enable (
|
||||
lib.mkDefault (lib.getExe config.dependencies.tinymist.package)
|
||||
);
|
||||
websocat = lib.mkIf (cfg.websocatPackage != null) (lib.mkDefault (lib.getExe cfg.websocatPackage));
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue