diff --git a/README.md b/README.md index f11a999..68db46f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/autoload/markdown.vim b/autoload/markdown.vim index 1238ff8..096ed84 100644 --- a/autoload/markdown.vim +++ b/autoload/markdown.vim @@ -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 diff --git a/doc/nvim-markdown-preview.txt b/doc/nvim-markdown-preview.txt index de3cb6c..ba1c5a5 100644 --- a/doc/nvim-markdown-preview.txt +++ b/doc/nvim-markdown-preview.txt @@ -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. @@ -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: