LazyVim / LazyVim

Neovim config for the lazy
https://lazyvim.github.io/
Apache License 2.0
16.58k stars 1.16k forks source link

bug: #4441

Closed tne-ops closed 2 days ago

tne-ops commented 3 days ago

Did you check docs and existing issues?

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 https://github.com/iamcco/markdown-preview.nvim/issues/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,
    },
  },
})
dpetka2001 commented 3 days ago

Related issue at markdown-preview repo https://github.com/iamcco/markdown-preview.nvim/issues/695. Not LazyVim related.

tne-ops commented 1 day ago

Oh thanks for this find. Didn't search markdown hard enough was looking for lazyvim as a key but affects all new macOS installs. Strange a new bug my old neovim/vimscript install works fine.

Sent via Superhuman iOS ( @.*** )

On Mon, Sep 16 2024 at 00:45, Folke Lemaitre < @.*** > wrote:

Closed #4441 ( https://github.com/LazyVim/LazyVim/issues/4441 ) as not planned.

— Reply to this email directly, view it on GitHub ( https://github.com/LazyVim/LazyVim/issues/4441#event-14267474541 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/ATK6MOJTHC2HPAFLFYWCDULZWZ5BVAVCNFSM6AAAAABOHGXUROVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGI3DONBXGQ2TIMI ). You are receiving this because you authored the thread. Message ID: <LazyVim/LazyVim/issue/4441/issue_event/14267474541 @ github. com>

-- You received this message because you are subscribed to the Google Groups "Systems Dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to @.*** To view this discussion on the web visit https://groups.google.com/a/tne.ai/d/msgid/sys/LazyVim/LazyVim/issue/4441/issue_event/14267474541%40github.com ( https://groups.google.com/a/tne.ai/d/msgid/sys/LazyVim/LazyVim/issue/4441/issue_event/14267474541%40github.com?utm_medium=email&utm_source=footer ).

gotgenes commented 3 hours ago

@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 commented 3 hours ago

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 commented 3 hours ago

Just made a new release!

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

tne-ops commented 2 hours ago

Wow that's awesome. Thanks again for all the amazing and hard work. Learning a lot about the innards of neovim and how cool lazyvim is on install.

Sent via Superhuman iOS ( @.*** )

On Wed, Sep 18 2024 at 12:47, Folke Lemaitre < @.*** > wrote:

Just made a new release!

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

— Reply to this email directly, view it on GitHub ( https://github.com/LazyVim/LazyVim/issues/4441#issuecomment-2359176730 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/ATK6MOKOWDNJZQDCLQDHXHDZXHDELAVCNFSM6AAAAABOHGXUROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGE3TMNZTGA ). You are receiving this because you authored the thread. Message ID: <LazyVim/LazyVim/issues/4441/2359176730 @ github. com>

-- You received this message because you are subscribed to the Google Groups "Systems Dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to @.*** To view this discussion on the web visit https://groups.google.com/a/tne.ai/d/msgid/sys/LazyVim/LazyVim/issues/4441/2359176730%40github.com ( https://groups.google.com/a/tne.ai/d/msgid/sys/LazyVim/LazyVim/issues/4441/2359176730%40github.com?utm_medium=email&utm_source=footer ).