制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗[!NOTE] Community fork of a deprecated extension. This extension is a fork of useblocks/sphinx-needs-vscode, the original Sphinx-Needs extension for VS Code, which useblocks has deprecated and no longer maintains (useblocks now develops ubCode).
The project is taken over to fix bugs found while using it (notably on Windows and with recent Sphinx-Needs versions) and to add a few features for navigating requirements. It is not affiliated with or endorsed by useblocks. Many thanks to the original authors for their work.
Sphinx-Needs is a Sphinx extension to manage requirements, specifications, test cases and other "needs" in your documentation.
Sphinx-Needs Explorer brings an enhanced experience for editing and navigating Sphinx-Needs projects in VS Code: code completion, hover, goto definition, find references and tree views of your needs and their links.
Bug fixes
needs.json and srcDir are now found on Windows, and Goto Definition / Find References work there.content instead of description
in recent needs.json files)... include:: are located in the right file.REQ_1 no longer matches REQ_10).New features
needs.json, filter by need type
and by tags.*.inc set to reStructuredText) show the needs defined in them.satisfies, verifies, ...); clicking a link jumps to the linked need.maxDistance. Click a need to open it, or center the graph on it.See the CHANGELOG for details.
Install Sphinx-Needs Explorer from the VS Code Marketplace, or download the .vsix file of a
release and run:
code --install-extension sphinx-needs-explorer-<version>.vsix
If the original Sphinx-Needs extension (useblocks.sphinx-needs-vscode) is installed, uninstall it first:
both extensions use the same commands and settings.
Build your Sphinx-Needs documentation, so that a needs.json file is generated
(see needs_build_json).
Configure the paths in .vscode/settings.json:
{
"sphinx-needs.needsJson": "${workspaceFolder}/docs/_build/html/needs.json",
"sphinx-needs.srcDir": "${workspaceFolder}/docs"
}
Open any .rst file to activate the extension.
| Setting | Description |
|---|---|
sphinx-needs.needsJson | Path to the needs.json file. |
sphinx-needs.srcDir | Sphinx source directory of the documentation. |
sphinx-needs.folders | List of needsJson / srcDir pairs, for several Sphinx-Needs projects in one workspace. |
sphinx-needs.activateFiles | Languages for which the language features are enabled. |
sphinx-needs.explorerOptions | Need options shown in the Fields section (default: status, type, tags). |
sphinx-needs.explorerItemHoverOptions | Need options shown when hovering a need in the views. |
sphinx-needs.loggingLevel | Logging level of the extension. |
${workspaceFolder} can be used in paths.
Code Completion:
Hover:
Goto Definition:
Find References:
ID Selection:
ID Auto Generation:
The animations below show the views of the original extension; the fork adds the Fields / Links sections, the filter and the refresh buttons described above.
Sphinx-Needs Views:
Sphinx-Needs Current View:
MIT. Original work Copyright (c) 2022 useblocks, fork changes Copyright (c) 2026 Christophe Seyler.