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

A CLI tool for searching and watching videos on youtube with no spyware and MPV and yt-dlp

A CLI tool for searching and watching videos on youtube with no spyware and MPV and yt-dlp

TruncatedDinosour 3 Feb 22, 2022
Shortcut-Maker - It is a tool that can be set to run any tool with a single command

Shortcut-Maker It is a tool that can be set to run any tool with a single command Coded by Dave Smith(Owner of Sl Cyber Warriors) Command list πŸ‘‡ pkg

Dave Smith 10 Sep 14, 2022
This is a Command Line program to interact with your NFTs, Cryptocurrencies etc

This is a Command Line program to interact with your NFTs, Cryptocurrencies etc. via the ThirdWeb Platform. This is just a fun little project that I made to be able to connect to blockchains and Web3

Arpan Pandey 5 Oct 02, 2022
A super simple terminal command shortener 🐟

pcmd A super simple terminal command shortener 🐟 Source code : https://github.com/j0fiN/pcmd Documentation : https://j0fin.github.io/pcmd About Durin

9 Mar 02, 2022
A minimal todo list for your terminal.

todo A minimal todo list for your terminal. Installation Run the following command. pip install git+https://github.com/piero-vic/todo.git Usage todo

Piero Lescano 7 Aug 08, 2022
GoogleFormSpammer - A simple CLI script to spam Google Forms used by Crypto Wallet scammers to collect stolen data

GoogleFormSpammer - A simple CLI script to spam Google Forms used by Crypto Wallet scammers to collect stolen data

14 Dec 17, 2022
A ZSH plugin that enables you to use OpenAI's powerful Codex AI in the command line.

A ZSH plugin that enables you to use OpenAI's powerful Codex AI in the command line.

Tom DΓΆrr 976 Jan 03, 2023
CLI tool to computes CO2 emissions of HPC computations following green-algorithms.org methodology

gqueue gqueue is a CLI (command line interface) tool that computes carbon footprint of HPC computations on clusters running slurm. It follows the meth

4 Dec 10, 2021
Python3 command-line tool for the inference of Boolean rules and pathway analysis on omics data

BONITA-Python3 BONITA was originally written in Python 2 and tested with Python 2-compatible packages. This version of the packages ports BONITA to Py

1 Dec 22, 2021
A startpage configured aesthetically with terminal-esque link formatting

Terminal-y Startpage Setup Clone the repository, then make an unformatted.txt file following the specifications in example.txt. Run format.py Open ind

belkarx 13 May 01, 2022
Magnificent app which corrects your previous console command.

The Fuck The Fuck is a magnificent app, inspired by a @liamosaur tweet, that corrects errors in previous console commands. Is The Fuck too slow? Try t

Vladimir Iakovlev 75k Jan 02, 2023
A command line tool to create a graph representing your Ansible playbook tasks and roles

Ansible Playbook Grapher ansible-playbook-grapher is a command line tool to create a graph representing your Ansible playbook plays, tasks and roles.

Mohamed El Mouctar Haidara 424 Dec 20, 2022
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
Wordle-textual - Play Wordle from the CLI, using Textual

Wordle, playable from the CLI This project seeks to emulate Wordle in your shell

PhenoM4n4n 3 Mar 29, 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
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

14 Sep 11, 2022
Declarative CLIs with argparse and dataclasses

argparse_dataclass Declarative CLIs with argparse and dataclasses. Features Features marked with a βœ“ are currently implemented; features marked with a

Mike DePalatis 29 Dec 06, 2022
Openstack bucket retention cli

Openstack bucket retention cli

Fatih Sarhan 3 Apr 03, 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
🐍The nx-python plugin allows users to create a basic python application using nx commands.

🐍 NxPy: Nx Python plugin This project was generated using Nx. The nx-python plugin allows users to create a basic python application using nx command

StandUP Communications 74 Aug 31, 2022