按照个官网步骤操作: https://docs.restructuredtext.net/articles/index.html
有四个注意点:
- 使用Python 3.x 版本
- 选择语言:reStructedText(否则快捷键无效)
- 点击conf.py后按照提示配置json文件
- 如果source是一个独立的文件夹则需要如图配置,指定python的绝对路径
.vscode/settings.json
{
"restructuredtext.builtDocumentationPath": "${workspaceRoot}/build/html",
"restructuredtext.confPath": "${workspaceFolder}/source",
"restructuredtext.updateOnTextChanged": "false",
"python.pythonPath": "/Users/usrname/opt/miniconda3/envs/vssphinx/bin/python"
}