Skip to main content
Back to Extensions Directory
coc.nvim fallback icon

coc-pydocstring

yaegassy

doq (python docstring generator) extension for coc.nvim

Installation CommandVim prompt
:CocInstall coc-pydocstring
GitHub owner
yaegassy
Version
v0.10.0
npm package
coc-pydocstring
Requirements
coc ^0.0.80
License
MIT
Repository
GitHub
npm latest published 2023-08-08Registry checked 2026-08-23Registry summary

Published Package Summary

coc-pydocstring

doq (python docstring generator) extension for coc.nvim

coc-pydocstring-demo

Install

CocInstall:

:CocInstall coc-pydocstring

vim-plug:

Plug 'yaegassy/coc-pydocstring', {'do': 'yarn install --frozen-lockfile'}

Feature

Quickly generate docstrings for python.

  • Code Action
  • Command
  • Built-in installer

Built-in install

coc-pydocstring allows you to create an extension-only "venv" and install "doq".

The first time you use coc-pydocstring, if "doq" command is not detected, you will be prompted to do a built-in installation.

You can also run the installation command manually.

:CocCommand pydocstring.install

Code Actions

Example key mapping (Code Action related):

nmap <silent> ga <Plug>(coc-codeaction-line)
xmap <silent> ga <Plug>(coc-codeaction-selected)
nmap <silent> gA <Plug>(coc-codeaction)

Usage:

In a "line" or "selection" containing def, async def, or class, enter the mapped key (e.g. ga) and display a list of code actions that can be performed.

  • Add docstring for "Line or Selected" by pydocstring
  • Add docstring for "File" by pydocstring
    • File-level code actions are disabled (false) by default.
    • If you want to use it, set pydocstring.enableFileAction to true in "coc-settings.json".

Similar plugins

Thanks

License

MIT


This extension is built with create-coc-extension

Read the complete README
  • doq (python docstring generator) extension for coc.nvim
Activation Events
  • onLanguage:python
Developer Resources

Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.

Open Developer Guide

Version History

This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.