how to use vscode restructuredtext extension ( lextudio.restructuredtext) with myst-parser on markdown file?

6.3k views Asked by At

I have a project configured to use Sphinx and the Myst-parser to build my documentation. The build is fine and everything works (my conf.py in sphinx is OK).

Now, I use VSCode as an editor and I would like to have a "live preview" in vscode for my "myst-flavored" markdown files. This means the preview should be the result of a sphinx build of my myst-markdown files.

In vscode I've found the following extensions:

  • lextudio.restructuredtext which offers a live preview for rst files and use Sphinx under the hood. Moreover, it should use my own conf.py file, so I think it could use the myst-parser as well.
  • MyST-Markdown (executablebookproject.myst-highlight) which offers syntax highlighting and directive autocomplete for "myst-flavored" markdown

But I could not find how to "execute" the live preview of restructuredtext extension on my myst-markdown files.

When I open a markdown file, I can only launch the "markdown preview", for standard markdown, but I cannot execute the restructuredtext preview (via the sphinx build).

How to use restructuredtext extension on myst-markdown files?

N.B: I already have the sphinx-autobuild server settup and working (the "dev" server), but find it not handy to preview in the browser instead of vscode directly. Moreover I wanted the preview only of the file being written...

0

There are 0 answers