【vscode】vscode主题样式颜色选择

前言

  • 最近比较忙,水一篇vscode主题样式。
  • vscode一般默认是黑色底色,关键字或者变量一般偏蓝绿,当满屏幕变量时眼睛看着会非常难受。
  • 之前用过hbuilder,虽然编辑器不如vscode,但是配色还算不错,我又在此基础上修改了下。
  • scope文档:https://www.sublimetext.com/docs/scope_naming.html#meta
  • 部分内容需要查找scope改成对应想要的颜色。
  • fira字体下载:https://github.com/tonsky/FiraCode/releases

配置

  • 尽量变量之类避免刺眼的颜色,之前翻代码时,每个变量都是一长串,一屏幕下来满屏刺眼看着太难受了。
"workbench.colorTheme": "Default Light+",
	//代码注释部分颜色
	"editor.tokenColorCustomizations": {
		"comments": "#95a3ab",
		"keywords": "#6d4d41",
		"variables": "#237066",
		"textMateRules": [
			{
				"scope": "keyword.control", //if ,else, try 等控制符
				"settings": {
					"foreground": "#C586C0"
				}
			},
			{
				"scope": "constant.language", //boolean null
				"settings": {
					"foreground": "#1c3f74"
				}
			},
			{
				"scope": "variable.language", //this
				"settings": {
					"foreground": "#1c3f74"
				}
			},
			{
				"scope": "punctuation.definition.variable",
				"settings": {
					"foreground": "#1c3f74"
				}
			},
			{
				"scope": "keyword.operator", //算数符
				"settings": {
					"foreground": "#f07d3b"
				}
			},
			{
				"scope": "storage.modifier", //修饰语
				"settings": {
					"foreground": "#f09090"
				}
			},
			{
				"scope": "entity.name.type.class", //类名
				"settings": {
					"foreground": "#c0526a"
				}
			},
			{
				"scope": "storage.type.primitive.java", //int 
				"settings": {
					"foreground": "#c0526a"
				}
			},
			{
				"scope": "entity.name.type.interface", //接口
				"settings": {
					"foreground": "#c0526a"
				}
			},
			{
				"scope": "entity.name.namespace", //导入部分
				"settings": {
					"foreground": "#74817c"
				}
			},
			{
				"scope": "entity.name.tag", //html标签
				"settings": {
					"foreground": "#d35c5c"
				}
			}
		]
	},
	"workbench.colorCustomizations": {
		"editorGroupHeader.tabsBackground": "#FFFAE8", // 标题栏未使用的地方
		"editorLineNumber.foreground": "#9F9371", //代码行号颜色
		"editor.lineHighlightBackground": "#E8DFC4", //代码选中高亮颜色
		"editor.selectionBackground": "#BCD68D",
		"editor.background": "#FFFAE8",
		"editorIndentGuide.background": "#cecdc2", //代码对齐线颜色
		//标题栏颜色设置
		"titleBar.activeBackground": "#d8ca9e",
		"titleBar.inactiveBackground": "#fffef9", //失去焦点时titlebar颜色
		//活动栏颜色
		//"activityBar.background": "#FFFAE8",          //设置这个颜色图标显示不清楚
		"activityBar.activeBackground": "#ece4c8", //打开菜单的颜色
		"activityBar.background": "#d8ca9e", // 背景色
		"activityBar.foreground": "#000000",
		//选项卡颜色设置
		"tab.activeModifiedBorder": "#41A863",
		"tab.hoverBackground": "#daeace",
		"tab.border": "#fffae8",
		"tab.activeBackground": "#daeace",
		"tab.activeForeground": "#AB7E05",
		"tab.inactiveBackground": "#fffae8",
		"tab.inactiveForeground": "#41A863",
		//侧边栏颜色设置
		"sideBarSectionHeader.background": "#FFFAE8",
		"sideBar.background": "#FFFAE8",
		"sideBarSectionHeader.foreground": "#AB7E05",
		"sideBar.border": "#d8ca9e",
		"sideBar.foreground": "#46433c",
		"sideBarTitle.foreground": "#46433c",
		//底部状态栏颜色设置
		"statusBar.background": "#AB7E05",
		//滚动条颜色
		"scrollbarSlider.background": "#cfb56a",
		"scrollbarSlider.hoverBackground": "#cfb56a",
		"scrollbarSlider.activeBackground": "#cfb56a",
		//终端窗口面板颜色设置
		"panel.background": "#fffcf3",
		"panel.border": "#d8ca9e",
		//弹出小窗口:选项设置提示窗口,源代码补全窗口
		"editorWidget.background": "#daeace", // 弹出小窗口的背景
		"editorWidget.foreground": "#46433c",
		"editorSuggestWidget.selectedBackground": "#e8dfc4", //代码提示选中行高亮
		"list.hoverBackground": "#e8dfc4", // 鼠标所在行的颜色
		"editorWidget.border": "#BCD68D", // 弹出小窗口的边框
		"list.activeSelectionBackground": "#41A863", //侧边栏选中高亮
		"list.inactiveSelectionBackground": "#d8ca9e" //侧边栏选中未获得焦点颜色
	},

	"editor.fontSize": 16,
	"editor.lineHeight": 22,
	"editor.fontFamily": "Fira Code",
	"editor.fontLigatures": true,
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

业火之理

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值