Sphinx integrations for Neovim.
This plugin is still under development, some functionalities may change.
Source for cross-referencing roles,
i.e :ref:
, :doc:
, py:func
, etc.
Note: this plugin makes use of the inventory file from Sphinx, so you need to have built your docs at least once to get suggestions, and rebuild when your docs change to get the up to date suggestions. You can use sphinx-autobuild to rebuild your docs automatically when there is a change.
Support for Intersphinx- Integration with fzf
- Sphinx queries for nvim-treesitter
Install using vim-plug.
Put this in your init.vim
.
Plug 'stsewd/sphinx.nvim', { 'do': ':UpdateRemotePlugins' }
Note: you need to have coc.nvim
installed to use the coc.nvim
integration.
See https://github.com/neoclide/coc.nvim/#quick-start.
Default values are shown in the code blocks.
Where to search for the local inventory file (objects.inv
).
The directories are relative to the conf.py
file.
let g:sphinx_html_output_dirs = [
\ '_build/html', 'build/html', '../_build/html', '../build/html',
\ '_build/dirhtml', 'build/dirhtml', '../_build/dirhtml', '../build/dirhtml',
\]
If results should include information from Intersphinx.
let g:sphinx_include_intersphinx_data = 1
Where to search for the environment file (environment.pickle
),
this file contains the inventories from Intersphinx.
The directories are relative to the conf.py
file.
let g:sphinx_doctrees_output_dirs = [
\ '_build/doctrees', 'build/doctrees', '../_build/doctrees', '../build/doctrees',
\ '_build/html/.doctrees', 'build/html/.doctrees', '../_build/html/.doctrees', '../build/html/.doctrees',
\ '_build/dirhtml/.doctrees', 'build/dirhtml/.doctrees', '../_build/dirhtml/.doctrees', '../build/dirhtml/.doctrees',
\]
Always prefix the reference with the name of the target,
i.e use :ref:`<python:comparisons>`
instead of :ref:`<comparisons>`
to link to the label “comparisons” in the doc set “python”.
let g:sphinx_always_use_scoped_targets = 1