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

Wordle for CLUE - WORDLE clone for Adafruit Clue

Wordle_for_CLUE This project is a clone of the very popular word solving puzzle

Michael Lacock 4 Feb 15, 2022
You'll never want to use cd again.

Jmp Description Have you ever used the cd command? You'll never touch that outdated thing again when you try jmp. Navigate your filesystem with unprec

Grant Holmes 21 Nov 03, 2022
CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple commands.

CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple com

1 Jan 10, 2022
keep your machine's shell history synchronize

SyncShell Yet another tool for laziness Keep your machine's shell history synchronize Get SyncShell Currently, SyncShell is just available on PyPi and

Masoud Ghorbani 53 Dec 12, 2022
Command line interface for unasync

CLI for unasync Command line interface for unasync Getting started Install Run the following command to install the package with pip: pip install unas

Leynier Gutiérrez González 3 Apr 04, 2022
Python remote shell.

Python remote shell.

Steven 9 Oct 17, 2022
Install python modules from pypi from a previous date in history

pip-rewind is a command-line tool that can rewind pypi module versions (given as command-line arguments or read from a requirements.txt file) to a previous date in time.

Amar Paul 4 Jul 03, 2021
Dead simple CLI tool to try Python packages - It's never been easier! :package:

try - It's never been easier to try Python packages try is an easy-to-use cli tool to try out Python packages. Features Install specific package versi

Timo Furrer 659 Dec 28, 2022
Spongebob-cli - Watch classic spongebob from the terminal

spongebob-cli Watch classic spongebob from the terminal! Thanks to everyone that

523 Jan 02, 2023
moviepy-cli: Command line interface for MoviePy.

Moviepy-cli is designed to apply several video editing in a single command with Moviepy as an alternative to Video-cli.

Kentaro Wada 23 Jun 29, 2022
Apple Silicon 'top' CLI

asitop pip install asitop What A nvtop/htop style/inspired command line tool for Apple Silicon (aka M1) Macs. Note that it requires sudo to run due to

Timothy Liu 1.2k Dec 31, 2022
An anime command-line system information tool written in python.

Animefetch - v0.0.3 An anime command-line system information tool written in python. Description Animefetch is an anime command-line system informatio

Thadeuks 6 Jun 17, 2022
🖍️This is a feature-complete clone of the awesome Chalk (JavaScript) library.

Terminal string styling done right This is a feature-complete clone of the awesome Chalk (JavaScript) library. All credits go to Sindre Sorhus. Highli

Fabian Keller 132 Dec 27, 2022
A super simple wallet application for the NANO cryptocurrency that runs in the terminal

Nano Terminal Wallet A super simple wallet application for the NANO cryptocurrency that runs in the terminal Written in 2021 by NinjaSnail1080 (Discor

9 Jul 22, 2022
Synchronization tool for external devices which does not support time stamps, e.g. over MTP.

MTP-Sync Tool to synchronize data to a slow device, e.g. a smartphone which is connected over MTP. A state file (.mtp_sync_state.json) is created in t

2 Jul 22, 2022
Tarstats - A simple Python commandline application that collects statistics about tarfiles

A simple Python commandline application that collects statistics about tarfiles.

Kristian Koehntopp 13 Feb 20, 2022
A Julia library for solving Wordle puzzles.

Wordle.jl A Julia library for solving Wordle puzzles. Usage julia import Wordle: play julia play("panic") 4 julia play("panic", verbose = true) I

John Myles White 3 Jan 23, 2022
This project contains the ClonedPerson dataset and code described in our paper "Cloning Outfits from Real-World Images to 3D Characters for Generalizable Person Re-Identification".

ClonedPerson This is the official repository for the ClonedPerson project, which contains the ClonedPerson dataset and code described in our paper "Cl

Yanan Wang 55 Dec 27, 2022
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

1 Feb 05, 2022
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

18.6k Dec 30, 2022