diff --git a/CHANGELOG.md b/CHANGELOG.md index 18117b3..4f3e2ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更新日志 +## [1.2.2] 2018-12-07 +- 修复php的`$this`高亮 +- 区分内置函数与自定义函数的高亮颜色 +- 优化html中的js高亮 ## [1.2.1] 2018-12-06 - 修复js对象的key的高亮 diff --git a/package.json b/package.json index 6919671..95ec275 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "米白色主题", "description": "🔥 米白色主题", "icon": "logo.png", - "version": "1.2.1", + "version": "1.2.2", "publisher": "yutent", "author": "Yutent [@yutent]", "engines": { diff --git a/src/es.js b/src/es.js index 3cd36fe..cf9af7d 100644 --- a/src/es.js +++ b/src/es.js @@ -2,10 +2,11 @@ const vars = require('./var') module.exports = [ { - name: 'Class extends, console', + 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' ], @@ -24,6 +25,20 @@ module.exports = [ } }, + { + name: 'build-in function', + scope: [ + 'source.js support.function.node.js', + 'meta.group.braces.curly.js support.function', + 'meta.function-call.ts support.function.ts', + 'support.function.builtin.js' + ], + settings: { + fontStyle: 'italic', + foreground: vars.magenta1 + } + }, + { name: 'js/ts italic', scope: [ diff --git a/src/php.js b/src/php.js index 9685d67..5c47eff 100644 --- a/src/php.js +++ b/src/php.js @@ -22,15 +22,33 @@ module.exports = [ } }, - // 变量 以及 $this + // 变量 + { + name: 'php dollar sign', + scope: ['punctuation.definition.variable.php'], + settings: { + foreground: vars.common2 + } + }, + + // $this { name: 'php dollar sign', scope: [ - 'punctuation.definition.variable.php', - 'variable.language.this.php' + 'variable.language.this.php', + 'variable.language.this.php punctuation.definition.variable.php' ], settings: { - foreground: vars.common2 + foreground: vars.red1 + } + }, + + { + name: 'php build in function', + scope: ['meta.function-call.php support.function'], + settings: { + fontStyle: 'italic', + foreground: vars.magenta1 } }, diff --git a/themes/color-theme.json b/themes/color-theme.json index f875d85..80b1296 100644 --- a/themes/color-theme.json +++ b/themes/color-theme.json @@ -473,8 +473,8 @@ } }, { - "name": "Class extends, console", - "scope": "support.type.object.console.js, support.type.object.module.js, support.constant.math, meta.class.extends.js > variable.other.readwrite.js", + "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", "settings": { "fontStyle": "bold italic", "foreground": "#ffb62c" @@ -488,6 +488,14 @@ "foreground": "#ffb62c" } }, + { + "name": "build-in function", + "scope": "source.js support.function.node.js, meta.group.braces.curly.js support.function, meta.function-call.ts support.function.ts, support.function.builtin.js", + "settings": { + "fontStyle": "italic", + "foreground": "#be7ee7" + } + }, { "name": "js/ts italic", "scope": "entity.other.attribute-name.js, entity.other.attribute-name.ts, entity.other.attribute-name.jsx, entity.other.attribute-name.tsx", @@ -535,11 +543,26 @@ }, { "name": "php dollar sign", - "scope": "punctuation.definition.variable.php, variable.language.this.php", + "scope": "punctuation.definition.variable.php", "settings": { "foreground": "#546e7a" } }, + { + "name": "php dollar sign", + "scope": "variable.language.this.php, variable.language.this.php punctuation.definition.variable.php", + "settings": { + "foreground": "#ff4628" + } + }, + { + "name": "php build in function", + "scope": "meta.function-call.php support.function", + "settings": { + "fontStyle": "italic", + "foreground": "#be7ee7" + } + }, { "name": "php heredoc/nowdoc", "scope": "keyword.operator.heredoc.php,keyword.operator.nowdoc.php",