doq (python docstring generator) extension for coc.nvim

Overview

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

Configuration options

  • pydocstring.enable: Enable coc-pydocstring extension, default: true
  • pydocstring.doqPath: The path to the doq tool (Absolute path), default: ""
  • pydocstring.builtin.pythonPath: Python 3.x path (Absolute path) to be used for built-in install, default: ""
  • pydocstring.enableInstallPrompt: Prompt the user before install, default: true
  • pydocstring.formatter: Docstring formatter (--formatter), valid options ["sphinx", "google", "numpy"], default: "sphinx"
  • pydocstring.templatePath: Path to template directory (--template_path), default: ""
  • pydocstring.ignoreException: Ignore exception statements (--ignore_exception), default: false
  • pydocstring.ignoreYield: Ignore yield statements (--ignore_yield), default: false
  • pydocstring.ignoreInit: Ignore generate docstring to init method (--ignore_init). This option only available at :CocCommand pydocstring.runFile, default: false
  • pydocstring.enableFileAction: Enable file-level code action, default: false

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".

Commands

  • pydocstring.runFile: Run doq for file
  • pydocstring.install: Install doq
    • It will be installed in this path:
      • Mac/Linux: ~/.config/coc/extensions/coc-pydocstring-data/doq/venv/bin/doq
      • Windows: ~/AppData/Local/coc/extensions/coc-pydocstring-data/doq/venv/Scripts/doq.exe

Similar plugins

Thanks

License

MIT


This extension is built with create-coc-extension

cmdpxl: a totally practical command-line image editor

cmdpxl: a totally practical command-line image editor

Jieruei Chang 476 Jan 07, 2023
img-proof (IPA) provides a command line utility to test images in the Public Cloud

overview img-proof (IPA) provides a command line utility to test images in the Public Cloud (AWS, Azure, GCE, etc.). With img-proof you can now test c

13 Jan 07, 2022
Convert shellcode into :sparkles: different :sparkles: formats!

Bluffy Convert shellcode into ✨ different ✨ formats! Bluffy is a utility which was used in experiments to bypass Anti-Virus products (statically) by f

pre.empt.dev 305 Dec 17, 2022
Python remote shell.

Python remote shell.

Steven 9 Oct 17, 2022
Runs a command in P4wnP1 and displays the output on OLED screen (SH1106)

p4wnp1-oled-terminal Runs a command in P4wnP1 and displays the output on OLED screen (SH1106) Works on Raspberry Pi Zero 2 W Tested successfully on RP

PawnSolo 1 Dec 14, 2021
Trans is a dependency-free CLI for Google Translate

Trans is a dependency-free CLI for Google Translate

11 Jan 04, 2022
Centauro - a command line tool with some network management functionality

Centauro Ferramenta de rede O Centauro é uma ferramenta de linha de comando com

1 Jan 01, 2022
MasterDuel Image Recognition Translation Command Line Tool

MasterDuelTranslate(Use Ygo Card DataBase,belong win32 window shot & image match)

PatchouliTC 77 Dec 01, 2022
stonky is a simple command line dashboard for monitoring stocks.

stonky is a simple command line dashboard for monitoring stocks.

Jessy Williams 228 Dec 14, 2022
Get Air Quality Index for your city/country 😷

Air Quality Index CLI Get Air Quality index for your City. Installation $ pip install air-quality-cli Contents Air Quality Index CLI Installation Cont

Yankee 40 Oct 21, 2022
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

Nelson 4 Dec 09, 2022
A curated list of awesome things related to Textual

Awesome Textual | A curated list of awesome things related to Textual. Textual is a TUI (Text User Interface) framework for Python inspired by modern

Marcelo Trylesinski 5 May 08, 2022
Tiny command-line utility for mapping broken keys to other positions.

brokenkey Tiny command-line utility for mapping broken keys to other positions. Installation Clone this repository using git: git clone https://github

0 Oct 04, 2021
🗃️ Fileio-cli wrapper for fileioapi.py with fire.py, inspiration DOS

🗃️ File.io File.io simply upload a file, share the link, and after it is downloaded, the file is completely deleted. An API wrapper for the file.io w

nkot56297 2 May 12, 2022
A Hikari command handler for people who love ducks.

A Hikari command handler for people who love ducks.

Jeremiah 2 Oct 09, 2022
Postgres CLI with autocompletion and syntax highlighting

A REPL for Postgres This is a postgres client that does auto-completion and syntax highlighting. Home Page: http://pgcli.com MySQL Equivalent: http://

dbcli 10.8k Jan 02, 2023
Terminal Colored Text for Python

Terminal Colored Text for Python

R3CKhi-**75 3 Sep 10, 2022
A Reverse Shell Python Packages

A Reverse Shell Python Packages

1 Nov 03, 2021
Command line tool for google dorks

CLI for google dorks This is the command line tool made with pytohn which allows the users to perform Google dorks easily Installation Install google

subrahmanya s hegade 3 Feb 08, 2022
A collection of command-line interface games written in python

Command Line Interface Python Games Collection of some starter python game projects for beginners How to play these games Clone this repository git cl

Paras Gupta 7 Jun 06, 2022