解决WSL和SSH远程下无法翻译的问题
-
找到vscode安装目录中的语法高亮文件
resources\app\extensions
-
将
syntaxes
文件夹拷到远程机器~/.vscode-server\extensions\ms-vscode.cpptools-1.12.4-linux-x64
路径中 -
将
resources\app\extensions\cpp\package.json
中的内容复制到~/.vscode-server/extensions/ms-vscode.cpptools-1.12.4-linux-x64/package.json
的contributes
中"grammars": [ { "language": "c", "scopeName": "source.c", "path": "./syntaxes/c.tmLanguage.json" }, { "language": "cpp", "scopeName": "source.cpp.embedded.macro", "path": "./syntaxes/cpp.embedded.macro.tmLanguage.json" }, { "language": "cpp", "scopeName": "source.cpp", "path": "./syntaxes/cpp.tmLanguage.json" }, { "scopeName": "source.c.platform", "path": "./syntaxes/platform.tmLanguage.json" }, { "language": "cuda-cpp", "scopeName": "source.cuda-cpp", "path": "./syntaxes/cuda-cpp.tmLanguage.json" } ],
-
重启vscode