Python Autodoc for Zed
Generates PEP 257 docstrings for Python functions and classes. Type """ on the line after a definition to trigger completion.
Handles typed parameters, return types, exceptions, dataclasses, async functions, *args/**kwargs, and nested functions.
Examples
- Function with typed parameters
- Function with exceptions
- Dataclasses

- Complex signatures
More examples can be found in examples/.
PEP 257 notes:
- Class docstrings get a summary only;
__init__parameters are documented in__init__ Nonereturn types are omittedRaises:is only generated when the function body containsraisestatements
Troubleshooting
The extension doesn't generate docstrings
- Ensure the extension is installed and enabled.
- Make sure the file is recognized as a Python file.
The exetension is failing to register for Python
If you've overridden the list of Python language servers in your settings.json, you'll need to include python-autodoc-lsp in the list. For example:
{
"languages": {
"Python": {
"language_servers": ["...", "python-autodoc-lsp"]
}
}
}License
MIT — see LICENSE.