yaegassy / coc-esbonio

esbonio ([Sphinx] Python Documentation Generator) language server extension for coc.nvim
https://www.npmjs.com/package/coc-esbonio
MIT License
12 stars 2 forks source link
coc coc-extensions coc-nvim linter neovim python restructuredtext sphinx vim

coc-esbonio

esbonio ([Sphinx] Python Documentation Generator) language server extension for coc.nvim

coc-esbonio-demo

Features

Install

CocInstall:

:CocInstall coc-esbonio

vim-plug:

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

Detect: esbonio

  1. esbonio.server.pythonPath setting
  2. Current python3 environment (e.g. venv or system global)
  3. builtin venv/bin/python or venv/Scripts/python.exe (Installation commands are also provided)

Bult-in install

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

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

You can also run the installation command manually.

:CocCommand esbonio.languageServer.install

TIPS

esbonio's language server can also handle python file docstrings. coc-esbonio will activate the extension when the rst file is opened. If you want coc-esbonio to work with python file as well, you must first open the rst file.

Configuration options

Commands

Code Actions

Example key mapping (Code Action related):

nmap <silent> ga <Plug>(coc-codeaction-line)
xmap <silent> ga <Plug>(coc-codeaction-selected)
nmap <silent> <leader>a <Plug>(coc-codeaction-cursor)

Actions:

Thanks

License

MIT


This extension is built with create-coc-extension