Settings¶
In order to use this extension, you must configure the following settings.
sphinx-needs.needsJson
¶
Specify Needs Json path. This Needs Json file is generated by building your Sphinx-Needs project.
It can be generated automatically by config needs_build_json, or manually by build needs.
sphinx-needs.srcDir
¶
Specify source directory of current Sphinx-Needs project. Normally, the source directory is the directory that contains conf.py.
sphinx-needs.activateFiles
¶
Specify a list of supported languages when extension got activated. Default supported languages are restructuredtext and python.
When opened file that is resolved to specified language by VsCode, then Sphinx-Needs language features will be available.
Example:
"sphinx-needs.activateFiles": [
"restructuredtext",
"python",
"plaintext"
]
All items in the list of sphinx-needs.activateFiles
must match the VsCode supported
language identifiers.
Hint
After update settings of
activateFiles
, restart VsCode.
sphinx-needs.explorerOptions
¶
Specify a list of comma seperated string of need options to display at Explorer View. Default is: [“status”, “links”, “tags”].
Example:
"sphinx-needs.explorerOptions": ["type", "description"]
sphinx-needs.explorerItemHoverOptions
¶
Specify a list of comma seperated string of need options to be displayed when hover over need ID at Explorer View. Default is: [“tags”].
Example:
"sphinx-needs.explorerItemHoverOptions": ["tags", "doctype"]
sphinx-needs.folders
¶
Specify a list of objects of sphinx-needs.needsJson and sphinx-needs.srcDir to support multiple docs inside one workspace. Default is: [].
Example:
"sphinx-needs.folders": [
{
"needsJson": "${workspaceFolder}/doc2/needs.json",
"srcDir": "${workspaceFolder}/doc2"
},
{
"needsJson": "${workspaceFolder}/doc1/needs.json",
"srcDir": "${workspaceFolder}/doc1"
}
]
Settings configuration¶
You can configure the settings of this extension in two ways:
Open your .vscode/settings.json, then inside the JSON file, you can specify the path for the above settings.
Or goto your VSCode Workspace settings and configure the settings.
Hint
${workspaceFolder} is supported.