vscode格式化 java_VScode编辑器格式化

这篇博客详细介绍了如何在VSCode中配置Java代码自动格式化的设置,包括设置自动保存、启用eslint自动修复、调整缩进、设置制表符大小、自动格式化以及特定语言的格式化规则。此外,还提及了背景图片和主题的相关个性化设置。

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

{

"files.autoSave": "onFocusChange",

"editor.mouseWheelZoom": true,

"vetur.validation.template": false,

//eslint 代码自动检查格式化相关配置

"eslint.validate": [

"javascript",

"javascriptreact",

{

"language": "html",

"autoFix": true

},

{

"language": "vue",

"autoFix": true

}

],

"eslint.autoFixOnSave": true,

"explorer.confirmDragAndDrop": false,

"editor.detectIndentation": false,

"editor.tabSize": 2, //制表符符号eslint

"editor.formatOnSave": true, //每次保存自动格式化

"javascript.format.insertSpaceBeforeFunctionParenthesis": true, //让函数(名)和后面的括号之间加个空格

"vetur.format.defaultFormatter.html": "js-beautify-html", //格式化.vue中html

"vetur.format.defaultFormatter.js": "vscode-typescript", //让vue中的js按编辑器自带的ts格式进行格式化

"vetur.format.defaultFormatterOptions": {

"js-beautify-html": {

"wrap_attributes": "force-aligned" //属性强制折行对齐

}

},

// vetur语法高亮

"emmet.syntaxProfiles": {

"vue-html": "html",

"vue": "html"

},

"window.zoomLevel": 1,

"editor.codeActionsOnSave": {

"source.fixAll.eslint": true

},

"liveServer.settings.donotShowInfoMsg": true,

"px-to-rem.px-per-rem": 13,

"code-runner.runInTerminal": true,

"code-runner.executorMap": {

"java": "cd $dir && javac -encoding utf-8 $fileName && java $fileNameWithoutExt"

},

"diffEditor.ignoreTrimWhitespace": true,

"workbench.iconTheme": "material-icon-theme",

//background背景图相关配置

"update.enableWindowsBackgroundUpdates": true,

"background.customImages": [

"[https://static.dreamwings.cn/wp-content/uploads/2018/04/282761-sample-1140x600.jpg](https://static.dreamwings.cn/wp-content/uploads/2018/04/282761-sample-1140x600.jpg)" //图片地址

],

"background.style": {

"content": "''",

"pointer-events": "none",

"position": "absolute", //图片位置

"width": "100%",

"height": "100%",

"z-index": "99999",

"background.repeat": "no-repeat",

"background-size": "100% 100%", //图片大小

"opacity": 0.15 //透明度

},

"background.useFront": true,

"background.useDefault": false,

"workbench.colorTheme": "Monokai Classic",

"workbench.startupEditor": "newUntitledFile",

"terminal.integrated.fontWeight": "bold",

"settingsSync.ignoredExtensions": [

] //是否使用默认图片

}

码砖不易,记得关注和点赞哦~~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值