Closed Abdulee closed 4 years ago
set let g:mkdp_echo_preview_url = 1
to see if can see preview page url
set
let g:mkdp_echo_preview_url = 1
to see if can see preview page url
Still doesn't do anything ... Can't see page url
Having the same issue
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
let g:mkdp_browser = 'brave '
let g:mkdp_echo_preview_url = 1
on Arch Linux with neovim v0.5.0-613-g44cbf288e
Also does not spit out the preview page url.
Using :mess
command and have any error message?
Using
:mess
command and have any error message?
@iamcco Same problem, :mess has no output. It is hard to reproduce the problem, sometimes it work for several seconds, then it stop working.
Well, I know the problem. These are steps to reproduce the issue.
nvim --listen 127.0.0.1:9999 test.md
:MarkdownPreview
, the issue is there, nothing preview page is opened, nothing messages are printed.nvim test1.md
. Run :MarkdownPreview
in this new instance, the plugin works(of course only in the new instance).And after setup
let $NVIM_MKDP_LOG_FILE = expand('~/mkdp-log.log')
let $NVIM_MKDP_LOG_LEVEL = 'debug'
The logs are as follows:
2020-08-06 17:45:30 ERROR (pid:97377) [app/nvim] - unhandledRejection Promise {
<rejected> Error: connect ENOENT 127.0.0.1:9999
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'connect',
address: '127.0.0.1:9999'
}
} Error: connect ENOENT 127.0.0.1:9999
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'connect',
address: '127.0.0.1:9999'
}
Output of :mess
internal/modules/cjs/loader.js:1033
throw err;
^
Error: Cannot find module 'tslib'
Require stack:
- /home/klock/.config/nvim/autoload/plugged/markdown-preview.nvim/app/lib/app/index.js
- /home/klock/.config/nvim/autoload/plugged/markdown-preview.nvim/app/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
at Function.Module._load (internal/modules/cjs/loader.js:899:27)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object.<anonymous> (/home/klock/.config/nvim/autoload/plugged/markdown-preview.nvim/app/lib/app/index.js:3:1
7)
at Module._compile (internal/modules/cjs/loader.js:1201:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/klock/.config/nvim/autoload/plugged/markdown-preview.nvim/app/lib/app/index.js',
'/home/klock/.config/nvim/autoload/plugged/markdown-preview.nvim/app/index.js'
]
@ikey4u should be fixed now.
@Abdulee your plugin install is not complete. do call mkdp#util#install()
again or go to plugin's app
directory run yarn install
or npm install
@iamcco
Thank your quick response!
But unfortunately, the patch fix listen address does not make the magic.
@iamcco
Thank your quick response!
But unfortunately, the patch fix listen address does not make the magic.
It's weird, it works for me. check the log.
@iamcco Thank your quick response! But unfortunately, the patch fix listen address does not make the magic.
It's weird, it works for me. check the log.
When I add proxy for yarn, it occurred to me that NODE does not recognize URL without a protocol! As a result, If nvim listen a remote address, the url should be passed like http://127.0.0.1:9999
rather than 127.0.0.1:9999
. 127.0.0.1:9999
could not be recognized in your NODE based plugin. Thats should be the key.
However, in the official documentation of neovim, it gives an example nvim --listen 127.0.0.1:9999
which has no protocol. And I have used command nvim --listen http://127.0.0.:9999
but neovim cannot recognize this address. It looks like that neovim does not support protocol!
Change nvim listen on unix socket, it works well and so does your plugin, the problem goes away.
@Abdulee your plugin install is not complete. do
call mkdp#util#install()
again or go to plugin'sapp
directory runyarn install
ornpm install
Thank you very much. I did a yarn install and it was it now works like a charm.
It's strange, I have somewhat the opposite result when mimicking @ikey4u 's approach
run:
nvim --listen 127.0.0.1:9999 README.md
Then run :MarkdownPreview
and it works.
When I do my normal routine:
nvim README.md
Then run :MarkdownPreview
and it often does nothing.
I usually use nvim, but I've been having some issues with their nightly build (0.5.0-Beta) (which I had to get to use my German QWERTZ keyboard's { [ ] } characters-- kind of essential--) getting segmentation faults.
So, I tried to switch to vim (8.2) and the good thing is that all my plugins with vim plug work fine, except for MarkdownPreview.
I tried all methods I found on the GH issues (cd into folder and run npm install
, run :PlugInstall
, :PlugUpgrade
, and :call mkdp#util#install()
, etc. and it seems to be all going fine (and it works for nvim like I said), but when I use vim and run :MarkdownPreview
, literally nothing happens. There is also no option for using vim to do something like:
vim --listen 127.0.0.1:9999 README.md
Any ideas? MarkdownPreview should work with vim >8.1?
I think the npm installs work differently in arch than in other distros.
I use packer for my nvim plugins, and:
The config use {'iamcco/markdown-preview.nvim', run = 'cd app && npm install'}
doesn't work for me, even if I have npm installed.
But this one use {'iamcco/markdown-preview.nvim', config = "vim.call('mkdp#util#install')"}
works well.
The install proposed in #329 should be the prebuild I think, this would cause less bugs.
It's strange, I have somewhat the opposite result when mimicking @ikey4u 's approach
run:
nvim --listen 127.0.0.1:9999 README.md
Then run
:MarkdownPreview
and it works.When I do my normal routine:
nvim README.md
Then run
:MarkdownPreview
and it often does nothing.I usually use nvim, but I've been having some issues with their nightly build (0.5.0-Beta) (which I had to get to use my German QWERTZ keyboard's { [ ] } characters-- kind of essential--) getting segmentation faults.
So, I tried to switch to vim (8.2) and the good thing is that all my plugins with vim plug work fine, except for MarkdownPreview.
I tried all methods I found on the GH issues (cd into folder and run
npm install
, run:PlugInstall
,:PlugUpgrade
, and:call mkdp#util#install()
, etc. and it seems to be all going fine (and it works for nvim like I said), but when I use vim and run:MarkdownPreview
, literally nothing happens. There is also no option for using vim to do something like:vim --listen 127.0.0.1:9999 README.md
Any ideas? MarkdownPreview should work with vim >8.1?
This actually solved the issue I was having with packer and getting :MarkdownPreview to launch
Hi, I have installed this plugin using vim plug however when I type the command i.e MarkdownPreview nothing happens. I am fairly new to nvim but not sure why this is happening don't have a lot of plugins or anything, running Arch linux. Here is a snippet of my plugins.vim file
As for init.vim I just pasted the default settings and added the firefox as the browser.