Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nvim-markdown-preview

Markdown preview in the browser using [pandoc](https://pandoc.org/) and [live-server](https://github.com/tapio/live-server) through Neovim's [job-control API](https://neovim.io/doc/user/job_control.html).
Markdown preview in the browser using [pandoc](https://pandoc.org/) and [live-server](https://github.com/compodoc/live-server) through Neovim's [job-control API](https://neovim.io/doc/user/job_control.html).

## Usage

Expand Down
3 changes: 2 additions & 1 deletion autoload/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ function! s:LiveServer.start(root, index_path)
if !exists('self.pid')
let mount_path = fnamemodify(a:index_path, ':h')
let index = fnamemodify(a:index_path, ':t')
let extra_opts = get(g:, 'nvim_markdown_preview_liveserver_extra_args', [])
let self.pid = jobstart([
\ 'live-server',
\ '--quiet',
\ '--mount='.'/:'.mount_path,
\ '--open='.index,
\ ],
\ ] + extra_opts + [a:root],
\ self,
\ )
endif
Expand Down
9 changes: 8 additions & 1 deletion doc/nvim-markdown-preview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License: GPL3
INTRODUCTION *nvim-markdown-preview*

Markdown preview in the browser using pandoc (https://pandoc.org/) and
live-server (https://github.com/tapio/live-server) through Neovim's
live-server (https://github.com/compdoc/live-server) through Neovim's
|job-control| API.


Expand Down Expand Up @@ -58,4 +58,11 @@ The default is `gfm` (Github flavored markdown).
let g:nvim_markdown_preview_format = 'markdown'
<

Set this variable to pass any additional options to live-server.

>
let g:nvim_markdown_preview_liveserver_extra_args =
\ ['--browser=librewolf', '--port=9999']
<

vim:tw=78:et:ft=help:norl: