vsode配置vue, 配置python
目前已经转python(django) + vue2全栈开发,虽然C++, c的项目目前也在维护
今天在配置vscode的vue2 + django的环境的时候发现打错了代码之后不报错
下面是解决办法:
安装插件
1、Auto Close Tag
2、Vetur
3、ESLint
4、Path Intellisense
5、prettier-Code formatter
6、Python
7、Pylance
下面是我 settings.json配置
这个是c盘总配置
{
"workbench.colorTheme": "Monokai Pro (Filter Octagon)",
"editor.inlineSuggest.enabled": true,
"github.copilot.enable": {
"*": false,
"plaintext": false,
"markdown": false,
"scminput": false,
"yaml": false,
"cpp": true
},
"git.ignoreLegacyWarning": true,
"git-graph.maxDepthOfRepoSearch": 5,
"editor.guides.bracketPairs": true,
"[python]": {
"editor.formatOnType": true
},
"editor.inlineSuggest.showToolbar": "always",
// "editor.fontFamily": "Consolas, 'Courier New', monospace",
"editor.fontFamily": "'Cascadia Mono', Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"background.enabled": true,
"background.customImages": [
"file:///E:/2.图片/壁纸/5464.png"
],
"background.style": {
"pointer-events": "none",
"position": "absolute",
"width": "100%",
"height": "100%",
"background-position": "center",
"background-repeat": "no-repeat",
"background-size": "100%,100%",
"opacity": 0.2
},
"background.useDefault": false,
"editor.cursorBlinking": "phase",
"remote.SSH.configFile": "C:\\Users\\sun\\.ssh\\config",
"update.mode": "none",
"C_Cpp.clang_format_style": "{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Linux, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4 } ",
"settingsSync.ignoredSettings": [],
"indentRainbow.excludedLanguages": [
"plaintext"
],
"thiefBook.filePath": "E:\\1.文档\\2.杂\\xs\\遮天.txt",
"thiefBook.currPageNumber": 2,
"background.fullscreen": {
"image": "",
"images": [],
"opacity": 0.91,
"size": "cover",
"position": "center",
"interval": 0
},
"security.workspace.trust.untrustedFiles": "open",
"bitoAI.codeCompletion.setAutoCompletionTriggerLogic": 250,
"[jsonc]": {
"breadcrumbs.showArrays": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[cpp]": {
"editor.wordBasedSuggestions": true,
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true
},
"explorer.confirmDragAndDrop": false,
"bitoAI.codeCompletion.enableAutoCompletion": true,
"bitoAI.codeCompletion.enableCommentToCode": true,
"editor.fontSize": 12,
"Codegeex.Privacy": true,
"dynoFileUtils.confirmDelete": false,
"Codegeex.DisabledFor": {
"cpp": false
},
"cmake.configureOnOpen": true,
"cmake.showOptionsMovedNotification": false,
"workbench.colorCustomizations": {
"editor.selectionHighlightBackground": "#288603",
"editor.selectionBackground":"#288603",
},
"go.autocompleteUnimportedPackages": true,
"python.defaultInterpreterPath": "D:\\python\\python.exe",
"python.analysis.autoImportCompletions": true,
"python.analysis.completeFunctionParens": true,
"editor.cursorSmoothCaretAnimation": "on",
"editor.smoothScrolling": true,
"workbench.list.smoothScrolling": true,
"terminal.integrated.smoothScrolling": true,
"workbench.iconTheme": "material-icon-theme",
"window.zoomLevel": 1,
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"C_Cpp.errorSquiggles": "enabled",
"prettier.tabWidth": 4,
"prettier.withNodeModules": true,
}
下面是只针对 vue2 + python
{
"python.linting.flake8Enabled": true,
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
},
"eslint.validate": [
"javascript",
"gavesciptreact",
"html",
"vue"
],
"eslint.options": {
"plugins":["html"]
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"vetur.format.defaultFormatter.js": "vscode-typescript",
"javascript.format.semicolons": "remove",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
//这个是括号颜色的选项
"editor.bracketPairColorization.independentColorPoolPerBracketType": false
}