Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: #4441

Closed
4 tasks done
tne-ops opened this issue Sep 14, 2024 · 7 comments
Closed
4 tasks done

bug: #4441

tne-ops opened this issue Sep 14, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@tne-ops
Copy link

tne-ops commented Sep 14, 2024

Did you check docs and existing issues?

  • I have read all the LazyVim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of LazyVim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.1

Operating system/version

MacOS 14.6.1

Describe the bug

installed LazyExtras Markdown options and want to use MarkdownPreview, it is enabled, but when I run it, I only get a windows that says Node.js v20.11.1

Tearing my hair out, trying to figure out what I've done wrong. The core MarkdownPreview talks about setting iamcco/markdown-preview.nvim#188 but setting mkdp_browser doesn't seem to help.

I tried :healthcheck but nothing interesting there.

Is there a node log somewhere, seems like it is trying to start a node server?

The https://www.lazyvim.org/extras/lang/markdown#markdown-previewnvim explanation seems to say that cp is tied to MarkdownPreviewToggle so confused why this node message comes up. Is there more setup to do?

I had this working in my old vimscript and there is a yarn install that is needed, is this done or do I need to do manually.

Sorry to be so stupid, I just can't figure out how to debug :-)

Steps To Reproduce

  1. vim README.md
  2. cp

What is get is no preview in the default browser (Safari) and instead I get a message window that just says

Node version 20.11

Seems like it is trying to do some sort of node setup

Expected Behavior

Should see the Markdown file in a browser and it sync scrolls as you edit it.

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s -- Minimal repro lua config
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "LazyVim/LazyVim", import = "lazyvim.plugins" },
    -- add any other plugins here
    -- from https://www.lazyvim.org/extras/lang/markdown#markdown-previewnvim
    {
      "iamcco/markdown-preview.nvim",
      ft = "markdown",
      cmd = { "MarkdownPreview", "MarkdownPreviewToggle", "MarkdownPreviewStop" },
      build = function()
        require("lazy").load({ plugins = { "markdown-preview.nvim" } })
        vim.fn["mkdp#util#install"]()
      end,
      config = function()
        vim.cmd([[do FileType]])
      end,
    },
  },
})
@tne-ops tne-ops added the bug Something isn't working label Sep 14, 2024
@dpetka2001
Copy link
Contributor

Related issue at markdown-preview repo iamcco/markdown-preview.nvim#695. Not LazyVim related.

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2024
@tne-ops
Copy link
Author

tne-ops commented Sep 17, 2024 via email

@gotgenes
Copy link

@dpetka2001

Not LazyVim related.

I disagree. LazyVim did not make the installation of this plugin start failing, but LazyVim includes this plugin in the Markdown extra.

I think this PR provides a helpful way forward. I found it linked in the markdown-preview.nvim issue that you posted above.

@dpetka2001
Copy link
Contributor

The plugin installs just fine in latest HEAD with Node 20.17.0 due to #4196 and it also opens correctly in the browser (Firefox that I use) the corresponding markdown file. You just have to wait for a new LazyVim release or follow HEAD if you don't want to wait.

@folke
Copy link
Collaborator

folke commented Sep 18, 2024

Just made a new release!

Still need to go through a lot or PRs tomorrow...

@tne-ops
Copy link
Author

tne-ops commented Sep 18, 2024 via email

@stepbystepcode
Copy link

#2214 (comment)
It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants