News: IntelliSense has been added since 47.0.0 release, thanks to the new Language Server.
This extension provides rich reStructuredText language support for Visual Studio Code. Now you write reStructuredText scripts using the excellent IDE-like interface that VS Code provides.
Homepage for this extension is at GitHub.
-
Syntax highlighting
-
Code snippets
code
Code blockimage
Imagefigure
Figurelink
Linkattention
Attentionnote
Notewarning
Warningerror
Errorhint
Hintimportant
Importantcaution
Cautiondanger
Dangertip
Tipadmonition
Admonitionrubric
Rubric (footnote)doc
Doc referenceref
Label referencelabel
Labeldownload
Downloadfile
Filekbd
Keyboard Shortcut
To trigger snippets, please refer to Visual Studio Code shortcuts.
-
Live Preview (Experimental, and Sphinx must be configured in advanced)
The shortcuts are
ctrl+shift+r
(on Maccmd+shift+r
) Previewctrl+k r
(on Maccmd+k r
) Preview to Side
Notice: The preview feature requires Python to be installed. The
sphinx
Python module is also required. Check out the steps to configure sphinx support.
-
Section Builder
The shortcut is
ctrl+=
(on Maccmd+=
).Pressing the shortcut key would convert the current line under the cursor to a section, by adding adornment (underlines below the title text).
Pressing the shortcut key multiple times switches among the adornment characters.
-
Linter (Experimental, and restructuredtext-lint must be configured in advanced)
Once configured properly, the linter scans the opened files and highlights those lines with issues detected.
The PROBLEMS tab should also show all issues detected for easy navigation.
Notice: The linter feature requires
restructuredtext-lint
Python module. Check out the steps to configure sphinx support. Due to the facts thatrestructuredtext-lint
does not support all Sphinx directives, there can be many false positives in its ouput.
-
IntelliSense (Experimental)
Once configured properly, suggestions would be provided when pressing
/
after lines such as- :doc:
to help input file path much quicker.
Notice: This feature is disabled by default. Check out the steps to configure sphinx support.
This extension is hosted at Visual Studio Marketplace
- Upgrade to Visual Studio Code 1.3.0 or above.
- Switch to the Extensions view by clicking the fifth icon in the left most bar.
- Type "restructuredtext" in the search box and hit Enter key.
- Click "Install" button to install "reStructuredText" extension.
Check out the development documentation for more details on how to contribute to this extension!
Check the dashboard on work items.
This extension is licensed under the MIT License. Please see the [third-party notices](Third Party Notices.txt) file for details on the third-party files that we include with releases of this project.
The project logo comes from Legendora Icon by Teekatas Suwannakrua.
The linter support is based on Cody Hoover's ruby-linter.
The initial idea was brought from Thomas Haakon Townsend's ReStructured Text Previewer, but soon after moving fully to Sphinx, this extension becomes its own beast.
The IntelliSense support is provided by the new reStructuredText Language Server.