VS Code常用配置及插件

1. 配置

{
    // 窗口缩放
    "window.zoomLevel": -0.5,
    // 配置工作台图标主体
    "workbench.iconTheme": "vscode-icons",
    // 首选颜色主题
    "workbench.colorTheme": "Material Theme Lighter",
    // 工作台侧边栏位置
    "workbench.sideBar.location": "left",
    // 首选深色背景
    "workbench.preferredDarkColorTheme": "Default Light+",
    // 控制工作台底部状态栏的可见性。
    "workbench.statusBar.visible": true,
    // 配置格式化代码
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter.notebook.ipynb"
    },

    // 设置字体类型
    "editor.fontFamily": "Fira Code",
    // 控制是否启用字体连字,true启用,false不启用,这里选择启用
    "editor.fontLigatures": true,
    // 设置字体大小
    "editor.fontSize": 14,
    // 设置字体粗细,可选normal,bold,"100"~"900"等,选择合适的就行
    "editor.fontWeight": "normal",
    // 在编辑器中启用代码操作小灯泡提示。
	"editor.lightbulb.enabled": true,
    // 当选择其中一项时,将突出显示匹配的括号。
	"editor.matchBrackets": "always",
    // 控制是否在多个工作区和窗口间共享记忆的建议选项
    "editor.suggestSelection": "first",
    // 在保存时运行的代码操作类型。
    "editor.codeActionsOnSave": {},
    // 启用 Tab 补全。
    "editor.tabCompletion": "on",
    // Tab宽度
    "editor.tabSize": 4,
    // 控制是否在键入时自动显示建议
    "editor.quickSuggestions": {
        "other": true,
        "comments": false,
        "strings": false
    },

    // 文件自动保存
    "files.autoSave": "onFocusChange",
    // 启用后,保存文件时在文件末尾插入一个最终新行。
	"files.insertFinalNewline": false,

    // 代码自动补全
    "python.jediEnabled": false,
    // 自动添加括号
    "python.autoComplete.addBrackets": true,
    // 为函数完成添加括号。
    "python.analysis.completeFunctionParens": true,
    // 使用pep8进行格式化
    "python.formatting.provider": "autopep8",
    // 定义语言服务器的类型   Microsoft
    "python.languageServer": "Default",
    // 禁用pylint代码错误提示
    "python.linting.enabled": false,
    // 配置Python路径
    "python.pythonPath": "D:\\Software\\python",
    // 配置Python解释器
    "python.defaultInterpreterPath": "D:\\Software\\python",
    // 添加环境变量系统路径外的路径
    "python.autoComplete.extraPaths": [
        "D:/Software/python/Lib/site-packages",
        "D:/Software/python/Scripts",
    ],
    // 其他导入搜索解析路径
    "python.analysis.extraPaths": [
        "D:/Software/python/Lib/site-packages",
        "D:/Software/python/Scripts"
    ],
    // 打开终端时,取消conda activate自动激活环境
    "python.terminal.activateEnvironment": false,

    // 设置默认终端
    // "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
    "terminal.integrated.defaultProfile.windows": "Command Prompt",  // 新写法
    // 设置终端字体
    "terminal.integrated.fontFamily": "田氏颜体大字库",

    // 是否开启编辑效果
    "powermode.enabled": true,
    // 效果样式  水花-particles, 烟花-fireworks, 火焰-flames, 雪花-magic, 幽灵-clippy, 激光-simple-rift, 大激光-exploding-rift
    "powermode.presets": "particles",
    // 时间间隔
    "powermode.comboTimeout": 5,
    // 是否抖动
    "powermode.enableShake": false,

    // 新版本消息提示,true为不再提示
    "vsicons.dontShowNewVersionMessage": true,
}

2. 插件

  • vscode-icons 文件图标
  • Material Theme 颜色主题
  • Power Mode 编辑效果
  • Python Python解析器
  • Chinese 中文语言
  • Code Runner 代码运行
posted @ 2023-04-14 16:30  烟墨  阅读(167)  评论(0)    收藏  举报