VisualStudio与vscode编译器简单自定义配置

本文介绍了如何在Visual Studio Code (VSCode) 中配置设置,实现保存时自动格式化文档,并展示了相关插件如Powermode的配置。重点配置了`editor.formatOnSave`选项以及针对不同语言的默认格式化器,例如JavaScript、HTML和JSON。此外,还调整了一些用户体验设置,如关闭确认提示和启用智能提交。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

visual studio 保存自动格式化 插件: format document on Save
在这里插入图片描述

vscode 自定义配置setting.json; 文件->首选项->设置->
在这里插入图片描述

其他可选设置:
在这里插入图片描述
在这里插入图片描述

{
    "git.enableSmartCommit": true,
    "git.autofetch": true,
    "git.confirmSync": false,
    "explorer.confirmDelete": false,
    "powermode.enabled": true,
    "powermode.presets": "flames",
    "powermode.shake.enabled": false,
    "powermode.combo.counterEnabled": "hide",
    "powermode.combo.timerEnabled": "hide",
    "python.defaultInterpreterPath": "C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python38\\python.exe",
    "kite.showWelcomeNotificationOnStartup": false,
    "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "[html]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "[typescript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter-notebook"
    },
    "python.languageServer": "Pylance",
    "explorer.confirmDragAndDrop": false,
    "diffEditor.ignoreTrimWhitespace": false,
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "[jsonc]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "vetur.format.defaultFormatter.js": "vscode-typescript",
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_attributes": "auto"
        },
        "prettyhtml": {
            "printWidth": 100,
            "singleQuote": false,
            "wrapAttributes": false,
            "sortAttributes": false
        }
    },
    "editor.formatOnSave": true,
    "javascript.updateImportsOnFileMove.enabled": "always",
    "security.workspace.trust.untrustedFiles": "open",
    "workbench.editor.untitled.hint": "hidden",
    "editor.codeActionsOnSave": {},
}

vscode火焰插件:power mode。配置在上面的json里;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值