Skip to content

Commit

Permalink
fix markdown-preview config error
Browse files Browse the repository at this point in the history
  • Loading branch information
ppenguin authored and NotAShelf committed Oct 30, 2024
1 parent 0947ab3 commit 8ff5056
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/plugins/utility/preview/markdown-preview/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
lib,
...
}: let
inherit (lib.strings) stringLength concatMapStringsSep;
inherit (lib.strings) concatMapStringsSep;
inherit (lib.modules) mkIf;

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

0 comments on commit 8ff5056

Please sign in to comment.