From 2c1c30c48dd944cca006e2fef77e7fff867eed59 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 16 Dec 2024 01:16:56 +0300 Subject: [PATCH] preview/markdown-preview: convert `mkdp_filetypes` to correct format --- modules/plugins/utility/preview/markdown-preview/config.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/plugins/utility/preview/markdown-preview/config.nix b/modules/plugins/utility/preview/markdown-preview/config.nix index 8349d3f..741278a 100644 --- a/modules/plugins/utility/preview/markdown-preview/config.nix +++ b/modules/plugins/utility/preview/markdown-preview/config.nix @@ -4,8 +4,10 @@ lib, ... }: let - inherit (lib.strings) concatMapStringsSep; inherit (lib.modules) mkIf; + inherit (lib.strings) concatMapStringsSep; + inherit (lib.generators) mkLuaInline; + cfg = config.vim.utility.preview.markdownPreview; in { config = mkIf cfg.enable { @@ -15,7 +17,7 @@ in { mkdp_auto_start = cfg.autoStart; mkdp_auto_close = cfg.autoClose; mkdp_refresh_slow = cfg.lazyRefresh; - mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)]; + mkdp_filetypes = mkLuaInline ''[${concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes}]''; mkdp_command_for_global = cfg.alwaysAllowPreview; mkdp_open_to_the_world = cfg.broadcastServer; mkdp_open_ip = cfg.customIP;