bazel-contrib / vscode-bazel

Bazel support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel
Apache License 2.0
241 stars 78 forks source link

Feature Request: Auto Docstring Generation #215

Open UebelAndre opened 4 years ago

UebelAndre commented 4 years ago

I've opened a pull-request to add Starlark support to NilsJPWerner/autoDocstring#159 but it feels like this plugin should provide the same or similar functionality.

cameron-martin commented 8 months ago

I see that buildifier warns when things don't have docstrings. Maybe it could implement a fix for this, and this extension could apply those fixes (this might be already implemented)?

vogelsgesang commented 6 months ago

Alternatively, I think this would also be nice to have inside the language servers?

A buildifier fix would necessarily be incomplete / partial, since buildifier could only generate the skeleton but not the actual documentation. As such, somebody needs to open the file in his editor, anyway, and this doesn't make sense as a "head-less" fix.

Implementing this in the language server would have the benefit, that we could take advantage of LSP's snippet support so people can use the tab key to switch between the various places in the template

CC @withered-magic @cameron-martin