Vscode Settings 文件

{
    //todo Better Comments 注释高亮

    //* 全局配置
    "workbench.settings.applyToAllProfiles": [
        "editor.acceptSuggestionOnCommitCharacter"
    ], // 设置项用于指定某些设置应应用到所有用户配置文件


    //* 编辑器配置
    "editor.rulers": [ ],
    "editor.formatOnType": true, // 在输入代码时自动格式化。
    "editor.formatOnPaste": true, // 在粘贴代码时自动格式化。
    "editor.formatOnSave": true, // 在保存文件时自动格式化代码。
    "files.autoSave": "onFocusChange", // 当窗口失去焦点时自动保存文件。
    "editor.mouseWheelZoom": true, // 启用通过鼠标滚轮缩放编辑器内容的功能。
    "editor.stickyScroll.enabled": true, // 启用粘性滚动(保持顶部和底部几行固定)。
    "editor.minimap.enabled": false, // 禁用迷你地图。
    "editor.minimap.size": "fit", // 设置迷你地图大小为适应内容。
    "editor.minimap.showSlider": "mouseover", // 总是显示迷你地图中的滑块。
    "editor.fontSize": 13, // 设置编辑器字体大小为13像素。
    "debug.console.fontSize": 13, // 调试控制台字体大小
    "editor.fontFamily": "Maple Mono NF CN", // 指定编辑器使用的字体。
    "editor.codeLensFontFamily": "Maple Mono NF CN", // 指定代码透镜(CodeLens)使用的字体。
    "editor.minimap.maxColumn": 80, // 设置迷你地图的最大列数为80。
    "editor.wordWrapColumn": 120, // 当文本超过120个字符时自动换行。
    "editor.acceptSuggestionOnCommitCharacter": false, // 禁用提交字符(如分号、右括号等)接受建议功能。
    "diffEditor.ignoreTrimWhitespace": false, // 不忽略差异编辑器中末尾空格的不同。
    "diffEditor.hideUnchangedRegions.enabled": false, // 不隐藏差异编辑器中未更改的区域。


    //* 用户界面设置
    "window.menuBarVisibility": "classic", // 使菜单栏显示在窗口顶部。
    "explorer.confirmDelete": false, // 删除文件或文件夹时不确认。
    "explorer.confirmDragAndDrop": false, // 拖拽文件或文件夹时不确认。
    "explorer.confirmPasteNative": false, // 使用系统剪贴板粘贴时不确认。
    "extensions.ignoreRecommendations": true, // 忽略扩展推荐。
    "window.restoreWindows": "none", // 启动VS Code时不恢复之前的窗口状态。
    "window.commandCenter": false, // 禁用命令中心。
    "workbench.colorTheme": "One Dark Pro", // 设置工作台颜色主题。
    "workbench.editorAssociations": { }, // 定义某些文件类型的默认打开方式。
    "accessibility.dimUnfocused.enabled": true, // 启用失焦时暗化非活动元素。
    "accessibility.dimUnfocused.opacity": 1, // 设置失焦时暗化效果的不透明度为1(即无暗化效果)。


    //* 文件处理和保存设置
    "files.eol": "\n", // 设置新行符为Unix风格(LF)。
    "security.workspace.trust.untrustedFiles": "open", // 允许在不受信任的工作区中打开文件。
    "git.openRepositoryInParentFolders": "prompt", // 当打开文件夹时,若检测到父文件夹中有Git仓库,则提示用户是否要使用该Git仓库。


    //* 集成终端设置
    "terminal.integrated.defaultProfile.windows": "Git Bash", // 设置Windows上集成终端的默认配置文件为Git Bash。
    "terminal.integrated.profiles.windows": {
        "Git Bash": {
            "path": "D:\\scoop\\apps\\git\\current\\bin\\bash.exe",
            "icon": "terminal-bash"
        }
    }, // 定义Windows上集成终端可用的配置文件。
    "terminal.integrated.mouseWheelZoom": true, // 启用集成终端中的鼠标滚轮缩放。
    "terminal.integrated.fontSize": 13, // 设置集成终端的字体大小。


    //* 格式化特定配置
    "[jsonc]": {
        "editor.defaultFormatter": "vscode.json-language-features" // json 使用vscode默认格式化。 
    },
    "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features" // html 使用vscode默认格式化。
    },


    //* 语言特定配置
    //? html
    "html.format.templating": true, // 启用HTML模板语法支持。
    "html.format.indentInnerHtml": true, // 对HTML内部元素进行缩进。
    //? javascript
    "javascript.format.semicolons": "remove", // 格式化JavaScript代码时移除分号。
    "javascript.preferences.importModuleSpecifierEnding": "minimal", // 最小化JavaScript模块引用路径。
    "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, // 不在匿名函数的关键字后插入空格。
    "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": false, // 不在控制流语句的关键字后插入空格。
    "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false, // 不在空的大括号内插入空格。
    "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false, // 不在非空大括号内插入空格。
    //? typescript
    "typescript.format.semicolons": "remove", // 格式化TypeScript代码时移除分号。
    //? css
    "css.format.spaceAroundSelectorSeparator": true, // 在CSS选择器分隔符周围添加空格。
    //? less
    "less.format.spaceAroundSelectorSeparator": true, // 在LESS选择器分隔符周围添加空格。
    //? json
    "json.format.keepLines": true, // 格式化JSON时保留多行结构。


    //* 格式化工具配置
    //? Prettier
    "prettier.semi": false, // Prettier格式化时在语句后添加分号。
    "prettier.singleQuote": true, // Prettier格式化时使用单引号。
    "prettier.jsxSingleQuote": true, // Prettier格式化JSX时使用单引号
    "prettier.trailingComma": "none", // Prettier格式化时不添加尾随逗号。
    "prettier.useTabs": true, // 使用制表符
    "prettier.tabWidth": 4, // 设置缩进大小为4个空格
    //? Vetur
    "vetur.validation.template": false, // 禁用 template 模板验证,避免与 Eslint 冲突
    "vetur.format.options.useTabs": true, // Vetur格式化Vue文件时使用制表符而非空格。


    //* 代码质量工具配置
    //? Eslint
    "eslint.enable": true, // 启用ESLint。
    "eslint.options": {
        "extensions": [
            ".js",
            ".jsx",
            ".vue"
        ] // 设置ESLint的选项,如检查哪些文件类型。
    },
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "vue"
    ], // 指定ESLint验证的语言。
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": "explicit" // 保存时显式运行ESLint修复所有问题。
    },
    //? Code Spell Checker
    "cSpell.userWords": [
        "antd",
        "autorun",
        "persistedstate",
        "Pinia",
        "Vetur"
    ], // 用户自定义拼写检查词典。
    "cSpell.language": "en", // 设置拼写检查的主要语言为英语。


    //* 其他
    //? Windows opacity
    "winopacity.opacity": 255, // code 透明插件
    //? Live Server
    "liveServer.settings.donotShowInfoMsg": false, // liveServer 启动提示


    "2024-12-11": [ ],


}

你可能感兴趣的:(vscode,ide,编辑器)