2018-12-06 16:27:50 +08:00
|
|
|
const vars = require('./var')
|
|
|
|
|
2018-12-01 21:17:55 +08:00
|
|
|
module.exports = [
|
2022-03-14 15:05:57 +08:00
|
|
|
{
|
|
|
|
name: 'import constant',
|
2022-03-17 13:42:16 +08:00
|
|
|
scope: ['meta.import variable.other.readwrite.alias'],
|
2022-03-14 15:05:57 +08:00
|
|
|
settings: {
|
|
|
|
foreground: vars.blue2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'import path',
|
2022-03-17 13:42:16 +08:00
|
|
|
scope: ['meta.import string.quoted.single', 'meta.import string.quoted.double'],
|
2022-03-14 15:05:57 +08:00
|
|
|
settings: {
|
|
|
|
fontStyle: 'underline',
|
|
|
|
foreground: vars.common
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'import path',
|
|
|
|
scope: [
|
2022-03-17 13:42:16 +08:00
|
|
|
'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'
|
2022-03-14 15:05:57 +08:00
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'none'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Decorators',
|
|
|
|
scope: [
|
|
|
|
'tag.decorator.js entity.name.tag.js',
|
|
|
|
'tag.decorator.js punctuation.definition.tag.js'
|
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'italic',
|
|
|
|
foreground: '#6182B8'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'meta.method.js',
|
|
|
|
scope: ['meta.class-method.js entity.name.function.js', 'variable.function.constructor'],
|
|
|
|
settings: {
|
|
|
|
foreground: '#6182B8'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'entity.name.method.js',
|
|
|
|
scope: ['entity.name.method.js'],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'italic',
|
|
|
|
foreground: '#6182B8'
|
|
|
|
}
|
|
|
|
},
|
2018-12-06 16:27:50 +08:00
|
|
|
{
|
2018-12-07 10:34:23 +08:00
|
|
|
name: 'Class extends, build-in, dom',
|
2018-12-06 16:27:50 +08:00
|
|
|
scope: [
|
2022-03-17 13:42:16 +08:00
|
|
|
'support.type.object.console',
|
|
|
|
'support.type.object.module',
|
|
|
|
'support.type.object.dom',
|
2018-12-06 16:27:50 +08:00
|
|
|
'support.constant.math',
|
2021-11-09 12:01:14 +08:00
|
|
|
'support.constant.json',
|
2022-03-17 13:42:16 +08:00
|
|
|
'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'
|
2018-12-06 16:27:50 +08:00
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'bold italic',
|
|
|
|
foreground: '#ffb62c'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: 'new Class',
|
|
|
|
scope: ['new.expr entity.name.type'],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'bold',
|
|
|
|
foreground: '#ffb62c'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-12-11 15:33:30 +08:00
|
|
|
{
|
|
|
|
name: 'js/ts doc',
|
|
|
|
scope: [
|
|
|
|
'comment.block.documentation entity.name.type.instance.jsdoc',
|
|
|
|
'comment.block.documentation constant.other.email.link.underline.jsdoc'
|
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'italic',
|
|
|
|
foreground: '#b6d5e0'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: 'js/ts doc email',
|
2021-11-09 12:01:14 +08:00
|
|
|
scope: ['comment.block.documentation constant.other.email.link.underline.jsdoc'],
|
2018-12-11 15:33:30 +08:00
|
|
|
settings: {
|
|
|
|
fontStyle: 'italic underline'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: 'ts string express',
|
|
|
|
scope: [
|
2022-03-17 13:42:16 +08:00
|
|
|
'punctuation.definition.template-expression.begin',
|
|
|
|
'punctuation.definition.template-expression.end'
|
2018-12-11 15:33:30 +08:00
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
fontStyle: '',
|
|
|
|
foreground: '#ff5370'
|
|
|
|
}
|
|
|
|
},
|
2022-03-14 15:05:57 +08:00
|
|
|
{
|
|
|
|
name: 'Punctuation',
|
|
|
|
scope: [
|
2022-03-17 13:42:16 +08:00
|
|
|
'meta.object.member meta.array.literal meta.brace.square',
|
|
|
|
'meta.object.member meta.arrow meta.brace.round',
|
2022-03-24 15:50:38 +08:00
|
|
|
'text.html.vue-html meta.brace.round',
|
|
|
|
'text.html.vue-html meta.directive.vue',
|
2022-03-17 13:42:16 +08:00
|
|
|
'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'
|
2022-03-14 15:05:57 +08:00
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
foreground: vars.common
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Variables',
|
2022-03-17 13:42:16 +08:00
|
|
|
scope: ['string.template meta.template.expression support.variable.property'],
|
2022-03-14 15:05:57 +08:00
|
|
|
settings: {
|
|
|
|
foreground: vars.common2
|
|
|
|
}
|
|
|
|
},
|
2018-12-07 10:34:23 +08:00
|
|
|
{
|
|
|
|
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',
|
2021-11-09 12:01:14 +08:00
|
|
|
'meta.function-call.js support.function.js',
|
2018-12-07 10:34:23 +08:00
|
|
|
'support.function.builtin.js'
|
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'italic',
|
|
|
|
foreground: vars.magenta1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-12-01 21:17:55 +08:00
|
|
|
{
|
|
|
|
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'
|
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'italic'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
2018-12-06 16:27:50 +08:00
|
|
|
name: 'Build-in props',
|
|
|
|
scope: [
|
|
|
|
'meta.group.braces.round variable.other.constant',
|
|
|
|
'support.type.object.module keyword.operator.accessor',
|
|
|
|
'support.constant.property.math.ts'
|
|
|
|
],
|
2018-12-01 21:17:55 +08:00
|
|
|
settings: {
|
2018-12-06 16:27:50 +08:00
|
|
|
fontStyle: 'italic bold',
|
2018-12-11 14:24:03 +08:00
|
|
|
foreground: vars.common
|
2018-12-01 21:17:55 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
// ts 类型
|
|
|
|
{
|
|
|
|
name: 'ts primitive/builtin types',
|
|
|
|
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: {
|
2018-12-06 16:27:50 +08:00
|
|
|
foreground: '#e5c07b',
|
2018-12-11 14:24:03 +08:00
|
|
|
fontStyle: 'bold italic'
|
2018-12-01 21:17:55 +08:00
|
|
|
}
|
2018-12-06 17:00:28 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: 'object keys',
|
|
|
|
scope: [
|
2022-03-17 13:42:16 +08:00
|
|
|
'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'
|
2018-12-06 17:00:28 +08:00
|
|
|
],
|
|
|
|
settings: {
|
|
|
|
fontStyle: 'italic bold',
|
|
|
|
foreground: vars.common
|
|
|
|
}
|
2022-03-16 15:21:50 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'jsx Tag',
|
2022-03-24 15:50:38 +08:00
|
|
|
scope: [
|
|
|
|
'entity.name.tag support.class.component',
|
|
|
|
'text.html.vue-html support.class.component.html'
|
|
|
|
],
|
2022-03-16 15:21:50 +08:00
|
|
|
settings: {
|
|
|
|
fontStyle: 'normal',
|
2022-03-17 13:42:16 +08:00
|
|
|
foreground: '#ff5370'
|
2022-03-16 15:21:50 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Tag Content String',
|
2023-07-27 10:07:23 +08:00
|
|
|
scope: ['meta.tag meta.tag.without-attributes meta.jsx.children', 'meta.tag meta.jsx.children'],
|
2022-03-16 15:21:50 +08:00
|
|
|
settings: {
|
|
|
|
foreground: '#546e7a'
|
|
|
|
}
|
2018-12-01 21:17:55 +08:00
|
|
|
}
|
|
|
|
]
|