From 6bed9fce93eb75b5a51c8f124e84d95bff68dfe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Mon, 17 Dec 2018 00:19:41 +0800 Subject: [PATCH] 1.3.5 --- CHANGELOG.md | 6 ++++-- package.json | 4 ++-- src/base.js | 10 +--------- src/html.js | 41 +++++++++++++++++++++++++++++++------- src/var.js | 2 +- themes/color-theme.json | 44 ++++++++++++++++++++++++----------------- 6 files changed, 68 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90e9807..e3d9ccd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ # 更新日志 -## [1.3.4] 2018-12-16 -- 支持html模板中mvvm指令高亮 + +## [1.3.5] 2018-12-17 +- 增加支持html模板中mvvm指令高亮 - 优化html特殊符号的高亮 +- 优化css/scss高亮 ## [1.3.2] 2018-12-12 diff --git a/package.json b/package.json index ffa27c8..450c2ba 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "one-plain", - "displayName": "米白色主题", + "displayName": "one plain", "description": "🔥 米白色主题", "icon": "logo.png", - "version": "1.3.4", + "version": "1.3.5", "publisher": "yutent", "author": "Yutent [@yutent]", "engines": { diff --git a/src/base.js b/src/base.js index 2d70736..452f51d 100644 --- a/src/base.js +++ b/src/base.js @@ -16,13 +16,6 @@ module.exports = [ foreground: vars.common2 } }, - { - name: 'Colors', - scope: ['constant.other.color'], - settings: { - foreground: vars.common2 - } - }, { name: 'Invalid', scope: ['invalid', 'invalid.illegal'], @@ -64,7 +57,6 @@ module.exports = [ name: 'Operator, Misc', scope: [ 'keyword.control', - 'constant.other.color', 'meta.tag', 'punctuation.definition.tag', 'punctuation.separator.inheritance.php', @@ -76,7 +68,7 @@ module.exports = [ 'keyword.other.substitution' ], settings: { - foreground: '#FF5370' + foreground: '#ff5370' } }, diff --git a/src/html.js b/src/html.js index e8bce7e..930be76 100644 --- a/src/html.js +++ b/src/html.js @@ -11,21 +11,48 @@ module.exports = [ ], settings: { fontStyle: 'italic', - foreground: '#FFB62C' + foreground: vars.yellow1 } }, { - name: 'CSS Classes', - scope: ['entity.other.attribute-name.class'], + name: 'CSS Class & ID', + scope: [ + 'entity.other.attribute-name.class', + 'entity.other.attribute-name.id.css' + ], settings: { - foreground: '#FFB62C' + foreground: vars.yellow1 } }, { - name: "CSS ID's", - scope: ['source.sass keyword.control'], + name: 'scss variable', + scope: [ + 'meta.property-value.scss variable.scss', + 'meta.at-rule.mixin.scss variable.scss', + 'meta.definition.variable.scss variable.scss' + ], settings: { - foreground: '#6182B8' + foreground: vars.red1 + 'cb' + } + }, + { + name: 'scss color value', + scope: ['constant.other.color.rgb-value.hex.css'], + settings: { + fontStyle: 'underline', + foreground: vars.magenta1 + } + }, + { + name: 'CSS url', + scope: [ + 'meta.property-value.css variable.parameter.url.css', + 'meta.property-value.scss variable.parameter.url.scss', + 'meta.property-value.scss keyword.operator.css', + 'meta.property-value.scss string.quoted.single.scss' + ], + settings: { + foreground: '#53c659' } }, { diff --git a/src/var.js b/src/var.js index f95e9a0..f8e5ed8 100644 --- a/src/var.js +++ b/src/var.js @@ -19,7 +19,7 @@ module.exports = { green2: '#27ae60', red1: '#ff4628', red2: '#ea4224', - yellow1: '#f39c12', + yellow1: '#ffb62c', yellow2: '#e67e22', magenta1: '#be7ee7', magenta2: '#9437ff' diff --git a/themes/color-theme.json b/themes/color-theme.json index 7c93a3c..bd97e1f 100644 --- a/themes/color-theme.json +++ b/themes/color-theme.json @@ -112,7 +112,7 @@ "terminal.ansiBrightGreen": "#2ecc71", "terminal.ansiBrightMagenta": "#be7ee7", "terminal.ansiBrightRed": "#ff4628", - "terminal.ansiBrightYellow": "#f39c12", + "terminal.ansiBrightYellow": "#ffb62c", "scrollbarSlider.background": "#90a4ae20", "scrollbarSlider.hoverBackground": "#90a4ae10", "scrollbarSlider.activeBackground": "#80CBC4", @@ -190,13 +190,6 @@ "foreground": "#546e7a" } }, - { - "name": "Colors", - "scope": "constant.other.color", - "settings": { - "foreground": "#546e7a" - } - }, { "name": "Invalid", "scope": "invalid, invalid.illegal", @@ -235,9 +228,9 @@ }, { "name": "Operator, Misc", - "scope": "keyword.control, constant.other.color, meta.tag, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded, keyword.other.template, keyword.other.substitution", + "scope": "keyword.control, meta.tag, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded, keyword.other.template, keyword.other.substitution", "settings": { - "foreground": "#FF5370" + "foreground": "#ff5370" } }, { @@ -465,28 +458,43 @@ "scope": "text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name, text.xhtml.basic entity.other.attribute-name.xhtml, text.xhtml.basic entity.other.attribute-name", "settings": { "fontStyle": "italic", - "foreground": "#FFB62C" + "foreground": "#ffb62c" } }, { - "name": "CSS Classes", - "scope": "entity.other.attribute-name.class", + "name": "CSS Class & ID", + "scope": "entity.other.attribute-name.class, entity.other.attribute-name.id.css", "settings": { - "foreground": "#FFB62C" + "foreground": "#ffb62c" } }, { - "name": "CSS ID's", - "scope": "source.sass keyword.control", + "name": "scss variable", + "scope": "meta.property-value.scss variable.scss, meta.at-rule.mixin.scss variable.scss, meta.definition.variable.scss variable.scss", "settings": { - "foreground": "#6182B8" + "foreground": "#ff4628cb" + } + }, + { + "name": "scss color value", + "scope": "constant.other.color.rgb-value.hex.css", + "settings": { + "fontStyle": "underline", + "foreground": "#be7ee7" + } + }, + { + "name": "CSS url", + "scope": "meta.property-value.css variable.parameter.url.css, meta.property-value.scss variable.parameter.url.scss, meta.property-value.scss keyword.operator.css, meta.property-value.scss string.quoted.single.scss", + "settings": { + "foreground": "#53c659" } }, { "name": "directive", "scope": "text.html.derivative meta.attribute.unrecognized entity.other.attribute-name.html", "settings": { - "foreground": "#f39c12" + "foreground": "#ffb62c" } }, {