From b6e2e7763ae5d17e0ea6aaa27173d33f77794b9b Mon Sep 17 00:00:00 2001 From: boydaihungst <38396158+boydaihungst@users.noreply.github.com> Date: Sat, 13 Sep 2025 23:54:41 +0700 Subject: [PATCH 1/2] fix(markdown-preview): use new build command. https://github.com/iamcco/markdown-preview.nvim/issues/690#issuecomment-2782326124 --- .../markdown-preview-nvim/init.lua | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua b/lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua index 5ee39911b..7297fc245 100644 --- a/lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua +++ b/lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua @@ -1,22 +1,7 @@ ---@type LazySpec return { "iamcco/markdown-preview.nvim", - build = function(plugin) - local package_manager = vim.fn.executable "yarn" and "yarn" or vim.fn.executable "npx" and "npx -y yarn" or false - - --- HACK: Use `yarn` or `npx` when possible, otherwise throw an error - ---@see https://github.com/iamcco/markdown-preview.nvim/issues/690 - ---@see https://github.com/iamcco/markdown-preview.nvim/issues/695 - if not package_manager then error "Missing `yarn` or `npx` in the PATH" end - - local cmd = string.format( - "!cd %s && cd app && COREPACK_ENABLE_AUTO_PIN=0 %s install --frozen-lockfile", - plugin.dir, - package_manager - ) - - vim.cmd(cmd) - end, + build = ":call mkdp#util#install()", ft = { "markdown", "markdown.mdx" }, cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, init = function() From a0059f0b28a0806c1dc119c6b707076d508cf713 Mon Sep 17 00:00:00 2001 From: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> Date: Sun, 14 Sep 2025 16:00:47 +0200 Subject: [PATCH 2/2] fix: use build command from docs. --- .../markdown-and-latex/markdown-preview-nvim/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua b/lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua index 7297fc245..c34db128c 100644 --- a/lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua +++ b/lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua @@ -1,7 +1,7 @@ ---@type LazySpec return { "iamcco/markdown-preview.nvim", - build = ":call mkdp#util#install()", + build = function() vim.fn["mkdp#util#install"]() end, ft = { "markdown", "markdown.mdx" }, cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, init = function()