-
Notifications
You must be signed in to change notification settings - Fork 926
Description
Preface
I'm not sure if this is the right place to request this feature or if there is a standalone repo for the editor / lexer / highlighter that should be used, or if this is something that should strictly be handled in an extension. Please point me in the right direction (especially if there is an existing extension I was unable to find).
Feature Request
The core feature I would like is doctest highlighting in the VSCode editor - specifically for Python files, but I'm sure other languages that support doctests would also find the feature valuable.
Currently there seems to be a very small amount of support because I see that the >>>
are highlighted and in some cases the parentheses are higlighted, but it would be be nice to have more extensive language support, especially to differentiate the "expected text" part of the doctest.
Here is an example side by side showing VSCode on the left and Vim (which ships with doctest highlighting) on the right
I would like VS code highlight different parts of this string to better differentiate the documentation text, the doctest logic, and the exepcted doctest results. Ideally the doctest logic would have higlighting similar to the language itself, but really the most important thing is that it stands out from the expected result and text part of the docstring.
Additional Context
Recently this feature was added to rouge-ruby. I've also opened a similar issue for highlight.js. Doctests have been around for a long time, and I'd really like to see the major editors / highlighters add more first-class support for the feature. I'm the author of xdoctest, so I have an interest improving the user experience surrounding doctests.