Compare commits

..

No commits in common. "1166e8aa1d60806df15dfb56b0e2a28e405709bd" and "42c5228dc1983c58e7a76e3d6ea8245d087b6063" have entirely different histories.

View file

@ -4,8 +4,9 @@
lib, lib,
... ...
}: let }: let
inherit (lib.strings) concatMapStringsSep; inherit (lib.strings) stringLength concatMapStringsSep;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
cfg = config.vim.utility.preview.markdownPreview; cfg = config.vim.utility.preview.markdownPreview;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -18,8 +19,8 @@ in {
mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)]; mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)];
mkdp_command_for_global = cfg.alwaysAllowPreview; mkdp_command_for_global = cfg.alwaysAllowPreview;
mkdp_open_to_the_world = cfg.broadcastServer; mkdp_open_to_the_world = cfg.broadcastServer;
mkdp_open_ip = cfg.customIP; mkdp_open_ip = mkIf (stringLength cfg.customIP > 0) cfg.customIP;
mkdp_port = cfg.customPort; mkdp_port = mkIf (stringLength cfg.customPort > 0) cfg.customPort;
}; };
}; };
} }