master
yutent 2022-03-17 13:42:16 +08:00
parent 62090918dd
commit 4cedbfb2f9
7 changed files with 141 additions and 91 deletions

View File

@ -1,7 +1,8 @@
# 更新日志 # 更新日志
## [1.6.3] 2022-03-16 ## [1.6.4] 2022-03-16
- 修复jsx, tsx着色问题 - 修复jsx, tsx着色问题
- 增加对dart语言的字符串模板的着色支持
## [1.6.2] 2022-03-14 ## [1.6.2] 2022-03-14
- 修复js字符串模板中的着色 - 修复js字符串模板中的着色

View File

@ -45,3 +45,36 @@ Build complete...
Build complete... Build complete...
Build complete... Build complete...
Build complete... Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...
Build complete...

View File

@ -3,7 +3,7 @@
"displayName": "one plain", "displayName": "one plain",
"description": "🔥 米白色主题", "description": "🔥 米白色主题",
"icon": "logo.png", "icon": "logo.png",
"version": "1.6.3", "version": "1.6.4",
"publisher": "yutent", "publisher": "yutent",
"author": "Yutent [@yutent]", "author": "Yutent [@yutent]",
"engines": { "engines": {

View File

@ -28,7 +28,7 @@ module.exports = [
scope: ['invalid.deprecated'], scope: ['invalid.deprecated'],
settings: { settings: {
fontStyle: 'italic', fontStyle: 'italic',
foreground: '#FFB62C' foreground: '#ffb62c'
} }
}, },
{ {
@ -42,7 +42,7 @@ module.exports = [
name: 'Keyword, Storage', name: 'Keyword, Storage',
scope: ['keyword', 'storage.type', 'storage.modifier'], scope: ['keyword', 'storage.type', 'storage.modifier'],
settings: { settings: {
foreground: '#FF5370' foreground: '#ff5370'
} }
}, },
{ {
@ -59,6 +59,7 @@ module.exports = [
'keyword.control', 'keyword.control',
'meta.tag', 'meta.tag',
'punctuation.accessor.js', 'punctuation.accessor.js',
'punctuation.accessor.ts',
'punctuation.definition.tag', 'punctuation.definition.tag',
'punctuation.separator.inheritance.php', 'punctuation.separator.inheritance.php',
'punctuation.definition.tag.html', 'punctuation.definition.tag.html',

View File

@ -1,12 +1,34 @@
const vars = require('./var') const vars = require('./var')
module.exports = [ module.exports = [
// { {
// name: 'dart type', name: 'import path',
// scope: ['storage.type.primitive.dart'], scope: ['meta.declaration.dart string.interpolated.single.dart'],
// settings: { settings: {
// foreground: '#e5c07b', fontStyle: 'underline',
// fontStyle: 'bold italic' foreground: vars.common
// } }
// } },
{
name: 'ts string express',
scope: [
'string.interpolated.double.dart string.interpolated.expression.dart',
'string.interpolated.single.dart string.interpolated.expression.dart'
],
settings: {
fontStyle: '',
foreground: '#ff5370'
}
},
{
name: 'Variables',
scope: [
'string.interpolated.double.dart variable.parameter.dart',
'string.interpolated.single.dart variable.parameter.dart'
],
settings: {
foreground: vars.common2
}
}
] ]

100
src/es.js
View File

@ -3,28 +3,14 @@ const vars = require('./var')
module.exports = [ module.exports = [
{ {
name: 'import constant', name: 'import constant',
scope: [ scope: ['meta.import variable.other.readwrite.alias'],
'meta.import.js variable.other.readwrite.alias.js',
'meta.import.jsx variable.other.readwrite.alias.jsx',
'meta.import.ts variable.other.readwrite.alias.ts',
'meta.import.tsx variable.other.readwrite.alias.tsx'
],
settings: { settings: {
foreground: vars.blue2 foreground: vars.blue2
} }
}, },
{ {
name: 'import path', name: 'import path',
scope: [ scope: ['meta.import string.quoted.single', 'meta.import string.quoted.double'],
'meta.import.js string.quoted.single.js',
'meta.import.js string.quoted.double.js',
'meta.import.jsx string.quoted.single.jsx',
'meta.import.jsx string.quoted.double.jsx',
'meta.import.ts string.quoted.single.ts',
'meta.import.ts string.quoted.double.ts',
'meta.import.tsx string.quoted.single.tsx',
'meta.import.tsx string.quoted.double.tsx'
],
settings: { settings: {
fontStyle: 'underline', fontStyle: 'underline',
foreground: vars.common foreground: vars.common
@ -33,14 +19,10 @@ module.exports = [
{ {
name: 'import path', name: 'import path',
scope: [ scope: [
'meta.import.js string.quoted.single.js punctuation.definition.string.begin.js', 'meta.import string.quoted.single punctuation.definition.string.begin',
'meta.import.js string.quoted.double.js punctuation.definition.string.begin.js', 'meta.import string.quoted.single punctuation.definition.string.end',
'meta.import.js string.quoted.single.js punctuation.definition.string.end.js', 'meta.import string.quoted.double punctuation.definition.string.begin',
'meta.import.js string.quoted.double.js punctuation.definition.string.end.js', 'meta.import string.quoted.double punctuation.definition.string.end'
'meta.import.ts string.quoted.single.ts punctuation.definition.string.begin.ts',
'meta.import.ts string.quoted.double.ts punctuation.definition.string.begin.ts',
'meta.import.ts string.quoted.single.ts punctuation.definition.string.end.ts',
'meta.import.ts string.quoted.double.ts punctuation.definition.string.end.ts'
], ],
settings: { settings: {
fontStyle: 'none' fontStyle: 'none'
@ -75,15 +57,15 @@ module.exports = [
{ {
name: 'Class extends, build-in, dom', name: 'Class extends, build-in, dom',
scope: [ scope: [
'support.type.object.console.js', 'support.type.object.console',
'support.type.object.module.js', 'support.type.object.module',
'support.type.object.dom.js', 'support.type.object.dom',
'support.constant.math', 'support.constant.math',
'support.constant.json', 'support.constant.json',
'meta.class.extends.js variable.other.readwrite.js', 'meta.class.extends variable.other.readwrite',
'meta.function-call.static.without-arguments.js variable.other.class.js', 'meta.function-call.static.without-arguments variable.other.class',
'meta.function-call.static.with-arguments.js variable.other.class.js', 'meta.function-call.static.with-arguments variable.other.class',
'meta.property.class.js variable.other.class.js' 'meta.property.class variable.other.class'
], ],
settings: { settings: {
fontStyle: 'bold italic', fontStyle: 'bold italic',
@ -123,10 +105,8 @@ module.exports = [
{ {
name: 'ts string express', name: 'ts string express',
scope: [ scope: [
'punctuation.definition.template-expression.begin.ts', 'punctuation.definition.template-expression.begin',
'punctuation.definition.template-expression.end.ts', 'punctuation.definition.template-expression.end'
'punctuation.definition.template-expression.begin.js',
'punctuation.definition.template-expression.end.js'
], ],
settings: { settings: {
fontStyle: '', fontStyle: '',
@ -136,20 +116,15 @@ module.exports = [
{ {
name: 'Punctuation', name: 'Punctuation',
scope: [ scope: [
'meta.object.member.js meta.array.literal.js meta.brace.square.js', 'meta.object.member meta.array.literal meta.brace.square',
'meta.object.member.js meta.arrow.js meta.brace.round.js', 'meta.object.member meta.arrow meta.brace.round',
'string.template.js meta.template.expression.js meta.array.literal.js meta.brace.square.js', 'string.template meta.template.expression meta.array.literal meta.brace.square',
'string.template.js meta.template.expression.js meta.brace.round.js', 'string.template meta.template.expression meta.brace.round',
'string.template.ts meta.template.expression.ts meta.array.literal.ts meta.brace.square.ts', 'meta.tag.attributes punctuation.section.embedded.begin',
'string.template.ts meta.template.expression.ts meta.brace.round.ts', 'meta.tag.attributes punctuation.section.embedded.end',
'meta.tag.attributes.jsx punctuation.section.embedded.begin.jsx', 'meta.tag.without-attributes punctuation.section.embedded.begin',
'meta.tag.attributes.jsx punctuation.section.embedded.end.jsx', 'meta.tag.without-attributes punctuation.section.embedded.end',
'meta.tag.without-attributes.jsx punctuation.section.embedded.begin.jsx', 'meta.type.annotation meta.brace.square'
'meta.tag.without-attributes.jsx punctuation.section.embedded.end.jsx',
'meta.tag.attributes.tsx punctuation.section.embedded.begin.tsx',
'meta.tag.attributes.tsx punctuation.section.embedded.end.tsx',
'meta.tag.without-attributes.tsx punctuation.section.embedded.begin.tsx',
'meta.tag.without-attributes.tsx punctuation.section.embedded.end.tsx'
], ],
settings: { settings: {
foreground: vars.common foreground: vars.common
@ -157,10 +132,7 @@ module.exports = [
}, },
{ {
name: 'Variables', name: 'Variables',
scope: [ scope: ['string.template meta.template.expression support.variable.property'],
'string.template.js meta.template.expression.js support.variable.property.js',
'string.template.ts meta.template.expression.ts support.variable.property.ts'
],
settings: { settings: {
foreground: vars.common2 foreground: vars.common2
} }
@ -226,12 +198,13 @@ module.exports = [
{ {
name: 'object keys', name: 'object keys',
scope: [ scope: [
'constant.other.object.key.js string.unquoted.label.js', 'constant.other.object.key string.unquoted.label',
'constant.other.object.key.js string.quoted.label.js', 'constant.other.object.key string.quoted.label',
'meta.object.member.js meta.object-literal.key.js string.quoted.double.js', 'meta.object.member meta.object-literal.key',
'meta.object.member.js meta.object-literal.key.js string.quoted.single.js', 'meta.object.member meta.object-literal.key string.quoted.double',
'meta.object.member.js meta.object-literal.key.js constant.numeric.decimal.js', 'meta.object.member meta.object-literal.key string.quoted.single',
'meta.objectliteral.js meta.object.member.js meta.object-literal.key.js' 'meta.object.member meta.object-literal.key constant.numeric.decimal',
'meta.field.declaration variable.object.property'
], ],
settings: { settings: {
fontStyle: 'italic bold', fontStyle: 'italic bold',
@ -240,18 +213,15 @@ module.exports = [
}, },
{ {
name: 'jsx Tag', name: 'jsx Tag',
scope: [ scope: ['entity.name.tag support.class.component'],
'entity.name.tag.jsx support.class.component.jsx',
'entity.name.tag.tsx support.class.component.tsx'
],
settings: { settings: {
fontStyle: 'normal', fontStyle: 'normal',
foreground: '#FF5370' foreground: '#ff5370'
} }
}, },
{ {
name: 'Tag Content String', name: 'Tag Content String',
scope: ['meta.tag.tsx meta.tag.without-attributes.tsx meta.jsx.children.tsx'], scope: ['meta.tag meta.tag.without-attributes meta.jsx.children'],
settings: { settings: {
foreground: '#546e7a' foreground: '#546e7a'
} }

View File

@ -203,7 +203,7 @@
"scope": "invalid.deprecated", "scope": "invalid.deprecated",
"settings": { "settings": {
"fontStyle": "italic", "fontStyle": "italic",
"foreground": "#FFB62C" "foreground": "#ffb62c"
} }
}, },
{ {
@ -217,7 +217,7 @@
"name": "Keyword, Storage", "name": "Keyword, Storage",
"scope": "keyword, storage.type, storage.modifier", "scope": "keyword, storage.type, storage.modifier",
"settings": { "settings": {
"foreground": "#FF5370" "foreground": "#ff5370"
} }
}, },
{ {
@ -229,7 +229,7 @@
}, },
{ {
"name": "Operator, Misc", "name": "Operator, Misc",
"scope": "keyword.control, meta.tag, punctuation.accessor.js, 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.accessor.js, punctuation.accessor.ts, 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": { "settings": {
"foreground": "#ff5370" "foreground": "#ff5370"
} }
@ -491,14 +491,14 @@
}, },
{ {
"name": "import constant", "name": "import constant",
"scope": "meta.import.js variable.other.readwrite.alias.js, meta.import.jsx variable.other.readwrite.alias.jsx, meta.import.ts variable.other.readwrite.alias.ts, meta.import.tsx variable.other.readwrite.alias.tsx", "scope": "meta.import variable.other.readwrite.alias",
"settings": { "settings": {
"foreground": "#0096ff" "foreground": "#0096ff"
} }
}, },
{ {
"name": "import path", "name": "import path",
"scope": "meta.import.js string.quoted.single.js, meta.import.js string.quoted.double.js, meta.import.jsx string.quoted.single.jsx, meta.import.jsx string.quoted.double.jsx, meta.import.ts string.quoted.single.ts, meta.import.ts string.quoted.double.ts, meta.import.tsx string.quoted.single.tsx, meta.import.tsx string.quoted.double.tsx", "scope": "meta.import string.quoted.single, meta.import string.quoted.double",
"settings": { "settings": {
"fontStyle": "underline", "fontStyle": "underline",
"foreground": "#90a4ae" "foreground": "#90a4ae"
@ -506,7 +506,7 @@
}, },
{ {
"name": "import path", "name": "import path",
"scope": "meta.import.js string.quoted.single.js punctuation.definition.string.begin.js, meta.import.js string.quoted.double.js punctuation.definition.string.begin.js, meta.import.js string.quoted.single.js punctuation.definition.string.end.js, meta.import.js string.quoted.double.js punctuation.definition.string.end.js, meta.import.ts string.quoted.single.ts punctuation.definition.string.begin.ts, meta.import.ts string.quoted.double.ts punctuation.definition.string.begin.ts, meta.import.ts string.quoted.single.ts punctuation.definition.string.end.ts, meta.import.ts string.quoted.double.ts punctuation.definition.string.end.ts", "scope": "meta.import string.quoted.single punctuation.definition.string.begin, meta.import string.quoted.single punctuation.definition.string.end, meta.import string.quoted.double punctuation.definition.string.begin, meta.import string.quoted.double punctuation.definition.string.end",
"settings": { "settings": {
"fontStyle": "none" "fontStyle": "none"
} }
@ -536,7 +536,7 @@
}, },
{ {
"name": "Class extends, build-in, dom", "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, support.constant.json, meta.class.extends.js variable.other.readwrite.js, meta.function-call.static.without-arguments.js variable.other.class.js, meta.function-call.static.with-arguments.js variable.other.class.js, meta.property.class.js variable.other.class.js", "scope": "support.type.object.console, support.type.object.module, support.type.object.dom, support.constant.math, support.constant.json, meta.class.extends variable.other.readwrite, meta.function-call.static.without-arguments variable.other.class, meta.function-call.static.with-arguments variable.other.class, meta.property.class variable.other.class",
"settings": { "settings": {
"fontStyle": "bold italic", "fontStyle": "bold italic",
"foreground": "#ffb62c" "foreground": "#ffb62c"
@ -567,7 +567,7 @@
}, },
{ {
"name": "ts string express", "name": "ts string express",
"scope": "punctuation.definition.template-expression.begin.ts, punctuation.definition.template-expression.end.ts, punctuation.definition.template-expression.begin.js, punctuation.definition.template-expression.end.js", "scope": "punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end",
"settings": { "settings": {
"fontStyle": "", "fontStyle": "",
"foreground": "#ff5370" "foreground": "#ff5370"
@ -575,14 +575,14 @@
}, },
{ {
"name": "Punctuation", "name": "Punctuation",
"scope": "meta.object.member.js meta.array.literal.js meta.brace.square.js, meta.object.member.js meta.arrow.js meta.brace.round.js, string.template.js meta.template.expression.js meta.array.literal.js meta.brace.square.js, string.template.js meta.template.expression.js meta.brace.round.js, string.template.ts meta.template.expression.ts meta.array.literal.ts meta.brace.square.ts, string.template.ts meta.template.expression.ts meta.brace.round.ts, meta.tag.attributes.jsx punctuation.section.embedded.begin.jsx, meta.tag.attributes.jsx punctuation.section.embedded.end.jsx, meta.tag.without-attributes.jsx punctuation.section.embedded.begin.jsx, meta.tag.without-attributes.jsx punctuation.section.embedded.end.jsx, meta.tag.attributes.tsx punctuation.section.embedded.begin.tsx, meta.tag.attributes.tsx punctuation.section.embedded.end.tsx, meta.tag.without-attributes.tsx punctuation.section.embedded.begin.tsx, meta.tag.without-attributes.tsx punctuation.section.embedded.end.tsx", "scope": "meta.object.member meta.array.literal meta.brace.square, meta.object.member meta.arrow meta.brace.round, string.template meta.template.expression meta.array.literal meta.brace.square, string.template meta.template.expression meta.brace.round, meta.tag.attributes punctuation.section.embedded.begin, meta.tag.attributes punctuation.section.embedded.end, meta.tag.without-attributes punctuation.section.embedded.begin, meta.tag.without-attributes punctuation.section.embedded.end, meta.type.annotation meta.brace.square",
"settings": { "settings": {
"foreground": "#90a4ae" "foreground": "#90a4ae"
} }
}, },
{ {
"name": "Variables", "name": "Variables",
"scope": "string.template.js meta.template.expression.js support.variable.property.js, string.template.ts meta.template.expression.ts support.variable.property.ts", "scope": "string.template meta.template.expression support.variable.property",
"settings": { "settings": {
"foreground": "#546e7a" "foreground": "#546e7a"
} }
@ -620,7 +620,7 @@
}, },
{ {
"name": "object keys", "name": "object keys",
"scope": "constant.other.object.key.js string.unquoted.label.js, constant.other.object.key.js string.quoted.label.js, meta.object.member.js meta.object-literal.key.js string.quoted.double.js, meta.object.member.js meta.object-literal.key.js string.quoted.single.js, meta.object.member.js meta.object-literal.key.js constant.numeric.decimal.js, meta.objectliteral.js meta.object.member.js meta.object-literal.key.js", "scope": "constant.other.object.key string.unquoted.label, constant.other.object.key string.quoted.label, meta.object.member meta.object-literal.key, meta.object.member meta.object-literal.key string.quoted.double, meta.object.member meta.object-literal.key string.quoted.single, meta.object.member meta.object-literal.key constant.numeric.decimal, meta.field.declaration variable.object.property",
"settings": { "settings": {
"fontStyle": "italic bold", "fontStyle": "italic bold",
"foreground": "#90a4ae" "foreground": "#90a4ae"
@ -628,15 +628,15 @@
}, },
{ {
"name": "jsx Tag", "name": "jsx Tag",
"scope": "entity.name.tag.jsx support.class.component.jsx, entity.name.tag.tsx support.class.component.tsx", "scope": "entity.name.tag support.class.component",
"settings": { "settings": {
"fontStyle": "normal", "fontStyle": "normal",
"foreground": "#FF5370" "foreground": "#ff5370"
} }
}, },
{ {
"name": "Tag Content String", "name": "Tag Content String",
"scope": "meta.tag.tsx meta.tag.without-attributes.tsx meta.jsx.children.tsx", "scope": "meta.tag meta.tag.without-attributes meta.jsx.children",
"settings": { "settings": {
"foreground": "#546e7a" "foreground": "#546e7a"
} }
@ -886,6 +886,29 @@
"foreground": "#c7c8cb" "foreground": "#c7c8cb"
} }
}, },
{
"name": "import path",
"scope": "meta.declaration.dart string.interpolated.single.dart",
"settings": {
"fontStyle": "underline",
"foreground": "#90a4ae"
}
},
{
"name": "ts string express",
"scope": "string.interpolated.double.dart string.interpolated.expression.dart, string.interpolated.single.dart string.interpolated.expression.dart",
"settings": {
"fontStyle": "",
"foreground": "#ff5370"
}
},
{
"name": "Variables",
"scope": "string.interpolated.double.dart variable.parameter.dart, string.interpolated.single.dart variable.parameter.dart",
"settings": {
"foreground": "#546e7a"
}
},
{ {
"name": "JSON Key - Level 0", "name": "JSON Key - Level 0",
"scope": "source.json meta.structure.dictionary.json support.type.property-name.json", "scope": "source.json meta.structure.dictionary.json support.type.property-name.json",