markdown-preview.nvim icon indicating copy to clipboard operation
markdown-preview.nvim copied to clipboard

Error 404

Open Pandoks opened this issue 1 year ago • 1 comments

OS: MacOS Sonoma (v14.2.1) Reproduction:

  • :MarkdownPreviewToggle or
  • :MarkdownPreview

Description: When starting markdown preview, it seems to start a localhost server at a random port, but it doesn't open the browser automatically. When I go to the localhost server location at the port (ie. localhost:<port>) there a 404 error.

Screenshots: 2024-02-12 10 28 18

Pandoks avatar Feb 12 '24 15:02 Pandoks

return {
  "iamcco/markdown-preview.nvim",
  ft = { "markdown" },
  build = function()
    vim.fn["mkdp#util#install"]()
  end,
  keys = {
    { "<leader>p", "<cmd>MarkdownPreviewToggle<cr>", mode = "n", desc = "Toggle previewer" },
  },
}

Tried reinstallation and also changing to npm installation and that also didn't work.

Pandoks avatar Feb 12 '24 16:02 Pandoks

I believe connecting to that address directly isn't intended to open the page. The problem is with the browser not opening. There are possibly steps you can do from your config to resolve that.

You're can see the preview page URL if you set There's a config option you can do to display the preview page URL as :MarkdownPreview is called.

Vimscript:

let g:mkdp_echo_preview_url = 1

Lua:

vim.g.mkdp_echo_preview_url = true

Does this URL work?

kunring avatar Feb 25 '24 07:02 kunring

Ok funnily enough, everything works now. I guess the latest updates have fixed this.

Pandoks avatar Feb 25 '24 20:02 Pandoks