Closed anntzer closed 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.
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...)
Closing as I believe the issue doesn't really belong here (see above).
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!