numpydoc.el
numpydoc.el copied to clipboard
Font-lock support for keywords in numpydoc docstrings
What is your stance about supporting font-locking of numpydoc keywords docstrings (similar to the code in https://github.com/glyph/python-docstring-mode/blob/master/python-docstring.el)? Do you think that it makes sense to add it to your numpydoc.el pkg or should it be part of a separate pkg?
Thomas Hisch @.***> writes:
What is your stance about supporting font-locking of numpydoc keywords docstrings (similar to the code in https://github.com/glyph/python-docstring-mode/blob/master/python-docstring.el)? Do you think that it makes sense to add it to your numpydoc.el pkg or should it be part of a separate pkg?
Hmm, I'm not sure I understand what exactly you have in mind. Which part(s) of the docstring would you like to see fontified? I just tried the python-docstring.el package and it fontified a bit of the docstring that was obviously rst syntax.
I would lke to see the RST sections fontified, e.g. Parameters and Returns. The python-docstring-mode currently fontifies RST roles, e.g., :func:abc but not the numpydoc style sections. We could also fontify the code in the Example section.
Ah I see, thanks for the explanation. I personally prefer a hard visual separation between code and docstrings in my Emacs buffers, but I'd be happy to support this inside of numpydoc.el as a minor mode. I'd welcome and would be happy to test a PR.