iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.67k stars 277 forks source link

docs: add lazy.nvim install description #583

Closed nolleh closed 11 months ago

nolleh commented 1 year ago

add install description for lazy.nvim

description for lazy.nvim:

gabyx commented 1 year ago

See #587 , thats the correct one

nolleh commented 1 year ago

@gabyx I failed to find out reply menu for your comment.

and could you kindly tell me which point is incorrect?

it's looks like personal favor,,, ^^; tnx for opinon.

nolleh commented 1 year ago

@gabyx but, after seeing your PR and seeing mkdp.vim file (the plugin command definition), It look's like other people may want to additional comment. user can use any of these command. (to handle below command.)

  noremap <buffer> <silent> <Plug>MarkdownPreview :MarkdownPreview<CR>
  noremap <buffer> <silent> <Plug>MarkdownPreviewStop :MarkdownPreviewStop<CR>
  nnoremap <buffer> <silent> <Plug>MarkdownPreviewToggle :MarkdownPreviewToggle<CR>

So applied your opinion. ( both of our PR WAS actually not fully handle user needs ^^;) now fully handle, from now. 👍

V4G4X commented 1 year ago

This is what I'm using:

{
        "iamcco/markdown-preview.nvim",
        cmd = { "MarkdownPreviewToggle" },
        ft = { "markdown" },
        build = function() vim.fn["mkdp#util#install"]() end,
}, -- Markdown Preview

From what I understand, other than restarting neovim, no other change is required.

But when I do that and try :MarkdownPreview it does not open preview window.

How do I fix this?
Where can I find logs?

V4G4X commented 1 year ago

This is what I'm using:

{
        "iamcco/markdown-preview.nvim",
        cmd = { "MarkdownPreviewToggle" },
        ft = { "markdown" },
        build = function() vim.fn["mkdp#util#install"]() end,
}, -- Markdown Preview

From what I understand, other than restarting neovim, no other change is required.

But when I do that and try :MarkdownPreview it does not open preview window.

How do I fix this?
Where can I find logs?

nolleh commented 1 year ago

This is what I'm using:

{
        "iamcco/markdown-preview.nvim",
        cmd = { "MarkdownPreviewToggle" },
        ft = { "markdown" },
        build = function() vim.fn["mkdp#util#install"]() end,
}, -- Markdown Preview

From what I understand, other than restarting neovim, no other change is required.

But when I do that and try :MarkdownPreview it does not open preview window.

How do I fix this? Where can I find logs?

actually it is little far from PR's contents, but want it to help, I will reply :)

  1. in my envrionment, it also working by using :MarkdownPreview (look like there is some differences yours and mine in env.)
  2. if you want to print log (with debug) in markdown-preview, follow the below.

in nvim(lua)

-- the path any where you want to write
vim.env.NVIM_MKDP_LOG_FILE = "/Users/nolleh/tmp/mkdp.log"
vim.env.NVIM_MKDP_LOG_LEVEL = "debug"

in my env, log remains like this. (after running :MarkdownPreview)

2023-08-14 18:37:34 INFO (pid:43524) [app/server] - server run:  8672
2023-08-14 18:37:34 INFO (pid:43524) [app/server] - open page [default]:  http://localhost:8672/page/1
2023-08-14 18:37:34 INFO (pid:43524) [app/server] - refresh page:  1
2023-08-14 18:37:34 INFO (pid:43524) [app/server] - client connect:  mjrIp6OReWKVOwUTAAAA 1

hope this will help you.