Skip to content

Add support for custom doc standardsΒ #654

@sforli

Description

@sforli

Is your feature request related to a problem? Please describe.
As far as the documentation goes, it does not seem possible to specify a custom doc format.

Describe the solution you'd like
It would be great if there was a way to specify a path to a custom YAML file to be used to generate the doc strings. Likely, that should be done on a per filetype basis.

This could be done at different levels. The simplest approach would be to specify a single file template for a filetype, e.g.:

let g:doge_doc_standard_python_custom = '/path/my_python_template.yml'

Alternatively, if the existing code would allow it without too much refactoring, a dictionary could be specified:

let g:doge_doc_standard_custom = { "cpp" : "/path/my_cpp.yml",
                                                           \ "python" : "/path/my_python.yml",
                                                           \ "rust" : "/path/my_rust.yml",
                                                          \ }

Describe alternatives you've considered
Other similar projects like vim-pydocstring have such functionality, where users can specify a path containing one or more custom styles. While this project is limited to Python code, I don't think it should be too difficult to provide the same while supporting multiple languages.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions