VS Code reStructuredText 找不到 conf.py 路径解决办法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013614126/article/details/83041864

VS Code reStructuredText 找不到 conf.py 路径解决办法

lextudio.restructuredtext 这一插件用来预览 rst 文件很方便,但是有时不能正常检测出 sphinx 配置,这时可以在 .vscode/settings.json 中写这样的配置

{
    "restructuredtext.confPath": "${workspaceRoot}/你的conf.py所在目录"
}

${workspaceRoot} 代表 VS Code 打开的文件夹的根目录。

例如我的 conf.py 路径是${workspaceRoot}/snippets/rst-sphinx/conf.py,则配置为:

{
    "restructuredtext.confPath": "${workspaceRoot}/snippets/rst-sphinx"
}

参考资料

  1. Help me with configure restruturedtext preview for docs folder
  2. restructuredText.confPath setting expanded in workspace settings
  3. lextudio.restructuredtext

猜你喜欢

转载自blog.csdn.net/u013614126/article/details/83041864