-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Nothing happens on MarkdownPreview #188
Comments
Do you also get no error messages, in that case? In my case, I ssh into a remote server, so I'm not sure to what extent the terminal might matter. |
I do not have any errors. After running the command nothing happens. But it works fine from iTerm2. So I think maybe the reason (on Mac) is that it tries to run the server but Mac doesn't give it access. |
If nothings happen mostly because open browser fail. try config: function g:open_browser(url) abort
" open url here
endfunction
let g:mkdp_browserfunc = 'g:open_browser' |
Setting |
the same issue.
@iamcco |
@Adolf-L function |
it doesn't work for me. |
Thanks for the suggestion, adding that function doesn't change anything for me unfortunately. Still no errors (well I had to capitalize the function name to avoid Digging more, even calling,
directly also doesn't seem to do anything for me (and no errors). Calling,
works, however when I put it as the first line of
the command runs but there is no output to stdout. Maybe I'm missing something, will try to come back to it in a couple of days. |
Running After I removed, reinstalled this plugin, and tested it with and without yarn, the issues was fixed for both cases. Testing machine: Ubuntu 18. |
Ahh, thanks for the pointer! In my case I also get,
will try to re-install. |
@Unknown-Chinese-User by default is should work on mac OS. You should checkout if you have install the plugin correctly. |
@Unknown-Chinese-User you should make sure install hook success. |
Could you teach me how to install hook?@iamcco |
I installed it in the first way. |
@Unknown-Chinese-User do |
Thank you! I can preview markdown now! |
FYI I had the same issue as @rth and @rdok (and probably others) above. I'm using Neovim on Ubuntu 18.04. Same error that tslib couldn't be found. So then I added Then I reopened neovim and ran Then the next time |
@Homlex make sure command |
I'm on Linux running tmux and alacritty (and neovim 0.5). The issue I ran into is that if your DISPLAY env var is not set, it will silently fail. This is a particularly long-running tmux session that may have outlasted the gnome process or the initial alaritty that I ran... or something. Anyway I really wonder where the markdown-preview logs are. I did not need them since my second guess at troubleshooting solved the problem (my first guess, using firefox, also works flawlessly once DISPLAY is set). But the question of where are the logs, still remains. It really should loudly complain in the vim messages if there is a failure to open the browser!!! |
@unphased try let $NVIM_MKDP_LOG_FILE = expand('~/mkdp-log.log')
let $NVIM_MKDP_LOG_LEVEL = 'debug' |
FWIW I had to change it to: let $NVIM_MKDP_LOG_FILE = $HOME . '/.tmp/mkdp-log.log'
let $NVIM_MKDP_LOG_LEVEL = 'debug' |
found out this also happens with iTerm2 after OS upgrade, my solution (after using node only to avoid any security issues with the downloaded binary) was to reinstall iTerm2 shell integration (and restart iTerm2). |
I've got the same symptom (nothing happens on MarkdownPreview, and nothing in When I enable the log file:
I get an endless stream of this:
However, the following works fine from within neovim:
I've tried deleting |
I just got mine working by using the pre-built version instead of the - Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
+ Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} |
@Corgile try to add |
Thanks a lot, I'll try it 😁 |
Hello everyone I had the same probelm and i was fixit follow the instructions with this answers: IMPORTANT: install tslib is very important to put woking on the plugin! |
Also had the same issue. Unlike @ellipsiis I use the Vundle manager. So I had to adjust his solution slightly. I went to ~/.vim/bundle/markdown-preview.nvim/app and then ran |
@pinkyblinky When I had the problem of preview, I tried the solutions that you posted, but your solution to ad the installation of yarn in the NVIM configuration and plugins files can't work for me. Is nice the fact of your simple solution worked for you, thanks for your feedback and comment. 😁 |
I've tried various things in this post to no avail. It's very frustrating to have no logs even with the proper configuration. |
I have freshly installed Linux on which I didn't installed yarn and was wondering why it doesn't works? 💩 |
Had similar issues as here and managed to fix with |
Remove the plugin and reinstall it solved my problem. Install via packer.nvim use({
"iamcco/markdown-preview.nvim",
opt = true,
ft = "markdown",
run = function()
vim.fn["mkdp#util#install"]()
end,
}) |
In my case, I solved it by going into |
This one solved my issue! Thanks @Unknown-Chinese-User 👍 |
I did the "by hand" installation, and now it works fine. |
I had the same problem on Windows 10. This step fixed my issue. Thanks!! |
Similarly, I am using plug and had to navigate to |
@pinkyblinky changing into the directory and running yarn install fixed it! Thanks all. |
Thanks for this plugin!
When I run
MarkdownPreview
on a.md
in neovim v0.3.4 nothing happens for me after I install this plugin and I'm not sure how to debug it.I have installed the package with
dein
and use the default config from the Readme.Running
checkhealth
produces,and I also have tried adding the following to
.config/nvim/init.vim
but this file is not created. Same thing happens (i.e. nothing) when I set,
and try to edit/save markdown file.
Is there any other things I should try to debug it (or log files that I can look at)? Thank you!
Edit: another possibly relevant information is that
MarkdownPreview
command is only available for markdown files, running it on any other file produces "E492: Not an editor command: MarkdownPreview", so at least the file type detection is working.The text was updated successfully, but these errors were encountered: