vscode配置vue + python

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
}
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值