mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 17:28:39 +02:00
45 lines
1 KiB
Nix
45 lines
1 KiB
Nix
|
{
|
||
|
lib,
|
||
|
pkgs,
|
||
|
...
|
||
|
}:
|
||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||
|
name = "typst-preview";
|
||
|
packPathName = "typst-preview.nvim";
|
||
|
package = "typst-preview-nvim";
|
||
|
|
||
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||
|
|
||
|
extraOptions = {
|
||
|
tinymistPackage = lib.mkPackageOption pkgs "tinymist" {
|
||
|
nullable = true;
|
||
|
};
|
||
|
websocatPackage = lib.mkPackageOption pkgs "websocat" {
|
||
|
nullable = true;
|
||
|
};
|
||
|
};
|
||
|
extraConfig = cfg: {
|
||
|
extraPackages = [
|
||
|
cfg.tinymistPackage
|
||
|
cfg.websocatPackage
|
||
|
];
|
||
|
|
||
|
plugins.typst-preview.settings = {
|
||
|
# Disable automatic downloading of binary dependencies
|
||
|
dependencies_bin = {
|
||
|
tinymist = lib.mkIf (cfg.tinymistPackage != null) (lib.mkDefault (lib.getExe cfg.tinymistPackage));
|
||
|
websocat = lib.mkIf (cfg.websocatPackage != null) (lib.mkDefault (lib.getExe cfg.websocatPackage));
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
settingsExample = {
|
||
|
debug = true;
|
||
|
port = 8000;
|
||
|
dependencies_bin = {
|
||
|
tinymist = "tinymist";
|
||
|
websocat = "websocat";
|
||
|
};
|
||
|
};
|
||
|
}
|