最近学习python,但是由于python的编辑器pycharm占用电脑内存大导致有些配置不太好的电脑卡顿,就使用vs code写代码了,vs code集成了多种编程语言的插件。但是在使用过程中写python代码会报错的问题,而运行结果却正常,有强迫症的我找了很久问题,最终取得了战果的胜利。
"window.zoomLevel": 0,
"search.followSymlinks": false,
"editor.formatOnSave": true,
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.tslint": true
},
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue",
{
"language": "vue",
"autoFix": true
},
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
],
"emmet.syntaxProfiles": {
"javascript": "jsx",
"vue": "html",
"vue-html": "html"
},
"editor.tabSize": 2,
"files.associations": {
"*.vue": "vue"
},
"eslint.options": {
"extensions": [".js", ".vue"]
},
"search.exclude": {
"**de_modules": true,
"**/bower_components": true,
"**/dist": true
},
"git.confirmSync": false,
"javascript.implicitProjectConfig.experimentalDecorators": true,
"editor.renderWhitespace": "boundary",
"editor.cursorBlinking": "smooth",
"editor.minimap.enabled": true,
"editor.minimap.renderCharacters": true,
//"editor.fontFamily": "'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'",
"window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
"editor.codeLens": true,
"editor.snippetSuggestions": "top",
"editor.fontWeight": "none",
"stylelint.enable": true,
"editor.fontSize": 16,
"editor.rulers": [
//代码长度
120
],
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"vsicons.dontShowNewVersionMessage": false,
"powermode.enabled": true,
"powermode.presets": "fireworks",
"powermode.comboTimeout": 5,
"powermode.enableShake": false,
"powermode.backgroundMode": "mask",
"workbench.colorTheme": "Visual Studio Dark",
"explorer.confirmDelete": false,
"tabnine.experimentalAutoImports": true,
"python.autoComplete.extraPaths": [
]
}
将此配置复制到python的setting.json文件中保存,然后关闭,系统会提示让你下载一个插件,点击install下载,然后关闭软件重新进入即可。