Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Python Doc LinksNew to Visual Studio Code? Get it now.
Python Doc Links

Python Doc Links

Rufat

|
29 installs
| (1) | Free
Ctrl+Click navigation for Python docstring/comment references (filename.py, :py:func:, :py:class:, :py:data:, :py:mod:, short Sphinx forms) in VS Code and Cursor.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python Doc Links (VS Code / Cursor)

Русский · Releases · Repository

VS Code / Cursor extension that enables go-to-definition from Python docstring/comment references.

It makes references like submodule.py, :py:func:submodule.process_submodule_data, and :func:run_main_flow navigable with Ctrl+Click (or F12).

Developed with AI assistance (Cursor / LLM). Part of the plugins monorepo.

Supported patterns

Pattern Resolves to
filename.py File in workspace
:py:func:module.func Function definition
:py:func:module.py.func Function definition (tolerant filename form)
:func:module.func Function definition
:func:module.py.func Function definition (tolerant filename form)
:func:func Function in the current file
:py:class:module.Class Class definition
:class:Class Class in the current file
:py:data:module.var Module-level variable (var = …)
:data:var Variable in the current file
:py:attr:module.attr Same as data (module-level name)
:py:func:module.name If not a def, also tries class and assignment
:py:mod:module Module file (module.py)
:py:mod:module.py Module file (filename form)

Example

def example():
    """
    File: submodule.py
    Function: :py:func:`submodule.process_submodule_data`
    Function (filename form): :py:func:`submodule.py.process_submodule_data`
    Function (current module): :func:`run_main_flow`
    Variable: :py:data:`config.hosters_data`
    Class: :py:class:`ObjectWithProperties`
    Module: :py:mod:`submodule`
    Module (filename form): :py:mod:`submodule.py`
    """

Install (persistent, via VSIX)

Build the VSIX package:

npm install -g @vscode/vsce
cd vscode/py-doc-links
build.bat

Then install the generated .vsix.

Command Palette (primary method, VS Code and Cursor):

  1. Open Command Palette: F1, Ctrl+Shift+P (Windows/Linux), Cmd+Shift+P (macOS), or View → Command Palette
  2. Type: Install from VSIX
  3. Select Extensions: Install from VSIX...
  4. Pick the .vsix file (see path below)

Resulting package file:

vscode/py-doc-links/build/py-doc-links-0.2.10.vsix

Limitations

  • Function lookup is heuristic (module.func -> module.py + def func(...)).
  • If multiple files share the same basename, the copy in the same folder as the source file is preferred; matches under docs/ and similar trees are de-prioritized.
  • No rename/find-usages integration for these textual references.
  • Works only in Python files (language: python).

Related upstream context:

  • YouTrack PY-13902
  • YouTrack PY-27635

License

MIT — free to use, modify, and distribute, at your own risk.
plugins monorepo · Releases

Author

Rufat

Cursor IDE: Sign up with referral link — supports the author when you subscribe.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft