heavenshell/vim-pydocstring

does this also support Google Docstring Style?

dhfromkorea opened this issue ยท 8 comments

Thank you for making and sharing this. Is there a way to easily extend this package to Google style?

@dhfromkorea
Sorry for late response.

I don't know what is Google style docstring.
Could you show me sample?

def foo(arg1, arg2=None):
   pass

What should pydocstring.vim generate?

@samizdis
Thank you for comment.

Maybe you can set multi.txt like following.

"""{{_header_}}

{{_indent_}}Args:
{{_indent_}}{{_args_}}:

{{_indent_}}Returns:
"""

Function singature.

def add_value(self, arg1, arg2):
    pass

would be genereate like following

def add_value(self, arg1, arg2):
    """add_value

    Args:
        arg1:
        arg2:

    Returns:
    """
    pass

Thank you so much!

Could this be included in the default templates and add an option like g:pydocstring_style = google?

@yifeikong
No.
But you can set your own path like

let g:pydocstring_templates_dir = '/path/to/your/templates/google'

You can put your own templates to the path.

Hello, this issue is very helpful. Could you please add the manual how to set the new template to the README section. I think it would help more people :)
Thank you very much.

@trashcleaner
doc/pydocstring.vim was mentioned about formatter, but I added to README.rst

btw, documentation PRs are very very welcome ๐Ÿ˜‰