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
}

相关推荐

  1. vscode配置代码片段

    2024-04-08 21:20:04       55 阅读
  2. Vscode配置SSH

    2024-04-08 21:20:04       54 阅读
  3. VSCode】自定义配置

    2024-04-08 21:20:04       35 阅读
  4. vscode 配置git

    2024-04-08 21:20:04       60 阅读
  5. vscode文件配置

    2024-04-08 21:20:04       54 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-08 21:20:04       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-08 21:20:04       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-08 21:20:04       87 阅读
  4. Python语言-面向对象

    2024-04-08 21:20:04       96 阅读

热门阅读

  1. Cisco Nexus 93180做为fex使用

    2024-04-08 21:20:04       39 阅读
  2. LeetCode 1600.王位继承顺序:深度优先搜索(DFS)

    2024-04-08 21:20:04       35 阅读
  3. Acwing2024蓝桥杯贡献法

    2024-04-08 21:20:04       33 阅读
  4. KVM基础管理命令

    2024-04-08 21:20:04       34 阅读
  5. C++(10): std::map、std::multimap与std::unordered_map

    2024-04-08 21:20:04       30 阅读
  6. VUE 实现路由的基本原理

    2024-04-08 21:20:04       29 阅读
  7. 如何进行Python代码的调试和测试?

    2024-04-08 21:20:04       31 阅读
  8. C# 一种基于 event 和 委托的事件机制

    2024-04-08 21:20:04       35 阅读
  9. pytest中文使用文档----11测试的参数化

    2024-04-08 21:20:04       33 阅读
  10. Llama Index的NodeParser详解

    2024-04-08 21:20:04       38 阅读