Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom doc standards #654

Open
sforli opened this issue Feb 25, 2024 · 1 comment
Open

Add support for custom doc standards #654

sforli opened this issue Feb 25, 2024 · 1 comment
Labels
feature New feature or request

Comments

@sforli
Copy link

sforli commented Feb 25, 2024

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

@kkoomen
Copy link
Owner

kkoomen commented Mar 5, 2024

Hi,

In v1-v2 we added this support through vimscript but deleted it in v3 as it became troublesome to implement through vimscript for users. The rewrite v4 does allow more flexibility for this feature as template are implemented through yaml instead of vimscript, so I will reconsider it, although it will take quite some time for me to work on this, as I'm quite busy recently.

@kkoomen kkoomen added the feature New feature or request label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants