marshallward / vim-restructuredtext

Syntax file for reStructuredText on Vim.
26 stars 12 forks source link

Use this syntax to highlight python docstrings? #15

Closed anntzer closed 7 years ago

anntzer commented 7 years ago

https://github.com/Rykka/riv.vim includes an option to highlight python docstrings with rst syntax (https://github.com/Rykka/riv.vim/blob/master/doc/riv_instruction.rst#docstring-highlighting). I have tried just copy-pasting their after/syntax/python.vim (https://github.com/Rykka/riv.vim/blob/598c8983dde237518732785a4726c8a3acb49617/after/syntax/python.vim) (you need to fix the paths to the rst.vim files that get included) but that triggered an bunch of errors (when used in conjunction with your rst.vim).

Any interest in trying to make a similar option available for your implementation of rst.vim? Thanks!

marshallward commented 7 years ago

Yeah, highlighting docstrings with python seems very reasonable. The code block looks very similar to the current code syntax highlighting, with different start and end conditions.

I will try putting this in tonight.

anntzer commented 7 years ago

Upon further thought, I now believe this functionality belongs to a python.vim syntax file rather than the other way round, for reasons explained at https://github.com/vim-python/python-syntax/issues/28. (But I'd still be happy to use your implementation if vim-python doesn't want to provide that...)

anntzer commented 7 years ago

Closing as I believe the issue doesn't really belong here (see above).