Wiki等のものをコピペしても動かなかったので調べました.
#設定
settings.json に以下のものを追加します.
"latex-workshop.view.pdf.viewer": "external",
"latex-workshop.view.pdf.external.viewer.command":
"C:\\(pathが入る)\\Local\\SumatraPDF\\SumatraPDF.exe",
"latex-workshop.view.pdf.external.viewer.args": [
"-reuse-instance",
"%PDF%"
],
"latex-workshop.view.pdf.external.synctex.command":
"C:\\(pathが入る)\\SumatraPDF\\SumatraPDF.exe",
"latex-workshop.view.pdf.external.synctex.args": [
"-reuse-instance",
"-forward-search",
"%TEX%",
"%LINE%",
"%PDF%"
],
これでforward searchとpdfの表示ができました.inverse searchはTeX Wikiのもので動きました.
参照:
James-Yu/LaTeX-Workshop View
https://github.com/James-Yu/LaTeX-Workshop/wiki/View,
TeX Wiki : SumatraPDF との synctex 連携
https://texwiki.texjp.org/?Visual%20Studio%20Code%2FLaTeX#g142ea7e