/python-sphinx-highlighter

An extension for VS Code that highlights Sphinx directives and references in Python docstrings.

Primary LanguagePythonMIT LicenseMIT

Python Sphinx Highlighter

This is an extension for Visual Studio Code designed to improve readbility of Python docstrings using the the Sphinx docstring format.

Features

Sphinx docstring highlight comparison

The source code shown is the the example from the Read the Docs Sphinx docstring format introduction.

Sphinx docstrings are compact and can easily be converted into HTML or PDF documentation using Sphinx and its Autodoc extension, but are generally harder to work with in the source code.

This extension alleviates this drawback by highlighting select Sphinx and reStructuredText directives within Python docstrings.

Compatibility Notes

This extension is only compatible with the default VS Code Python extension. It is not compatible with Python for VSCode, see #6 for details.

Release Notes

0.1.1

Bugfixes

  • Parameters ending in numbers will now be highlighted properly (#4)
  • Fixed parameters using wildcard notation (*args, **kwargs) not being recognized as sphinx tags (#4)
  • Inline formatting will no longer be applied when the control characters are surrounded by whitespace (#5)

0.1.0

Initial release