Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for rST files and PEP257 #35

Open
blaisep opened this issue Feb 9, 2016 · 3 comments
Open

Support for rST files and PEP257 #35

blaisep opened this issue Feb 9, 2016 · 3 comments
Labels

Comments

@blaisep
Copy link

blaisep commented Feb 9, 2016

Hi,
I wonder if anyone has considered support for rST files (I'm thinking particularly of the directives and labels often used when writing for Sphinx?
If I wanted to implement that, do you have any suggestions of the approach I should take?

Thanks!
-Blaise

@1st1
Copy link
Member

1st1 commented Feb 9, 2016

Hi @blaisep!

Last time I checked there were some ReST highlighters for ST, but I'm not sure of their quality. You might want to check them out first. In terms of approach, I'd really recommend you to use the same files layout and build system as we're using for MP. The syntaxdev package is especially useful for unittesting.

As for PEP 257 support in MagicPython -- we already highlight docstrings differently from regular strings. For instance, we don't highlight formatting placeholders etc. Do you have any other improvements in mind?

@1st1 1st1 added the question label Feb 9, 2016
@vpetrovykh
Copy link
Member

@blaisep If you want to try and improve doctring highlighting in MagicPython, I'd suggest looking at how docstring and docstring-prompt rules are structured in here.

@feluxe
Copy link

feluxe commented Jul 10, 2019

Do you have any other improvements in mind?

VSCode has awesome docstring highlighting for JavaScript/TypeScript:

docstring_ts

It would be awesome to have similar highlighting for reST docstrings in Python, they are currently hard to read:

docstring_py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants