From 29d4ba553e780665e152254bb0b6afca2e8e7f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Tue, 11 Dec 2018 14:24:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ build.js | 3 ++- package.json | 2 +- src/dart.js | 12 ++++++++++++ src/es.js | 9 ++++++--- src/plaintext.js | 1 + themes/color-theme.json | 7 ++++--- 7 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 src/dart.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f3e2ad..26f138f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # 更新日志 + +## [1.2.3] 2018-12-11 +- 优化js/ts的语法高亮 +- 优化md的高亮 + + ## [1.2.2] 2018-12-07 - 修复php的`$this`高亮 - 区分内置函数与自定义函数的高亮颜色 diff --git a/build.js b/build.js index c6cc9cd..e0eda40 100644 --- a/build.js +++ b/build.js @@ -17,7 +17,8 @@ const php = require('./src/php') const html = require('./src/html') const plaintext = require('./src/plaintext') const json = require('./src/json') -const tokenColors = [].concat(base, html, es, php, plaintext, json) +const dart = require('./src/dart') +const tokenColors = [].concat(base, html, es, php, plaintext, dart, json) for (let it of tokenColors) { if (Array.isArray(it.scope)) { diff --git a/package.json b/package.json index 95ec275..4947e71 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "米白色主题", "description": "🔥 米白色主题", "icon": "logo.png", - "version": "1.2.2", + "version": "1.2.3", "publisher": "yutent", "author": "Yutent [@yutent]", "engines": { diff --git a/src/dart.js b/src/dart.js new file mode 100644 index 0000000..2ae66a6 --- /dev/null +++ b/src/dart.js @@ -0,0 +1,12 @@ +const vars = require('./var') + +module.exports = [ + // { + // name: 'dart type', + // scope: ['storage.type.primitive.dart'], + // settings: { + // foreground: '#e5c07b', + // fontStyle: 'bold italic' + // } + // } +] diff --git a/src/es.js b/src/es.js index cf9af7d..4908779 100644 --- a/src/es.js +++ b/src/es.js @@ -8,7 +8,10 @@ module.exports = [ 'support.type.object.module.js', 'support.type.object.dom.js', 'support.constant.math', - 'meta.class.extends.js > variable.other.readwrite.js' + 'meta.class.extends.js variable.other.readwrite.js', + 'meta.function-call.static.without-arguments.js variable.other.class.js', + 'meta.property.class.js variable.other.class.js', + 'variable.other.object.ts' ], settings: { fontStyle: 'bold italic', @@ -61,7 +64,7 @@ module.exports = [ ], settings: { fontStyle: 'italic bold', - foreground: vars.blue2 + foreground: vars.common } }, @@ -78,7 +81,7 @@ module.exports = [ ], settings: { foreground: '#e5c07b', - fontStyle: 'bold' + fontStyle: 'bold italic' } }, diff --git a/src/plaintext.js b/src/plaintext.js index c0c933f..a72d47e 100644 --- a/src/plaintext.js +++ b/src/plaintext.js @@ -12,6 +12,7 @@ module.exports = [ name: 'inline code', scope: ['markup.inline'], settings: { + fontStyle: '', foreground: '#ff5370' } }, diff --git a/themes/color-theme.json b/themes/color-theme.json index 80b1296..bcac65e 100644 --- a/themes/color-theme.json +++ b/themes/color-theme.json @@ -474,7 +474,7 @@ }, { "name": "Class extends, build-in, dom", - "scope": "support.type.object.console.js, support.type.object.module.js, support.type.object.dom.js, support.constant.math, meta.class.extends.js > variable.other.readwrite.js", + "scope": "support.type.object.console.js, support.type.object.module.js, support.type.object.dom.js, support.constant.math, meta.class.extends.js variable.other.readwrite.js, meta.function-call.static.without-arguments.js variable.other.class.js, meta.property.class.js variable.other.class.js, variable.other.object.ts", "settings": { "fontStyle": "bold italic", "foreground": "#ffb62c" @@ -508,7 +508,7 @@ "scope": "meta.group.braces.round variable.other.constant, support.type.object.module keyword.operator.accessor, support.constant.property.math.ts", "settings": { "fontStyle": "italic bold", - "foreground": "#0096ff" + "foreground": "#90a4ae" } }, { @@ -516,7 +516,7 @@ "scope": "support.type.primitive.ts, support.type.builtin.ts, support.type.primitive.tsx, support.type.builtin.tsx, entity.name.type.module, entity.name.type", "settings": { "foreground": "#e5c07b", - "fontStyle": "bold" + "fontStyle": "bold italic" } }, { @@ -659,6 +659,7 @@ "name": "inline code", "scope": "markup.inline", "settings": { + "fontStyle": "", "foreground": "#ff5370" } },