This is not related to pydoc. It takes the pages from https://docs.python.org/3/ and turns them into vim help files.
Type :help <keyword> and nvim will show you the available options.
This plugin is 90% a copy of https://github.com/girishji/pythondoc.vim, which is based on https://github.com/sphinx-contrib/vimbuilder to compile shpinx documentations into vim help files.
In addition to pythondoc.vim, this plugin let's you choose between Python versions: 3.8 to 3.14.
Install via your preffered package manager.
RazorBest/pydoc.nvim
Setup the plugin in your init.lua
-- setup with defaults
require("pydoc-nvim").setup()
-- or setup with specific python version
require("pydoc-nvim").setup({
version = "3.9"
})Use the built-in help command and type your keyword. Nvim will do the best work to find the matches for the keyword.
:PyDocVersion <version> change the version of the documentation
The python documentations are stored in vim-help format, in the python_docs
directory. They are taken from the cpython repository and compiled from rst
using sphinx.
In order to update all the versions, run from the root of this repo:
./build_python_docs.sh
This script permforms the following:
- Clones the Python repo in tmp/cpython
- Extracts the available versions greater than
MIN_VERSION - Checks out on every version and performs the following, for each:
- Installs the virtual environment for the
Docandvimbuilder - Modifies
Doc/conf.pyforvimbuilder - Creates a makefile that runs sphinx with the
vimbuilderextension - Runs the makefile
- Copies the built files in
python_docs, in the corresponding version - Adds the Python version at the beginning of all the help files
- Runs vim helptags on the files
- Installs the virtual environment for the