one-plain/src/es.js

260 lines
7.5 KiB
JavaScript
Raw Normal View History

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',
scope: [
'meta.import.js variable.other.readwrite.alias.js',
2022-03-16 15:21:50 +08:00
'meta.import.jsx variable.other.readwrite.alias.jsx',
'meta.import.ts variable.other.readwrite.alias.ts',
'meta.import.tsx variable.other.readwrite.alias.tsx'
2022-03-14 15:05:57 +08:00
],
settings: {
foreground: vars.blue2
}
},
{
name: 'import path',
scope: [
'meta.import.js string.quoted.single.js',
'meta.import.js string.quoted.double.js',
2022-03-16 15:21:50 +08:00
'meta.import.jsx string.quoted.single.jsx',
'meta.import.jsx string.quoted.double.jsx',
2022-03-14 15:05:57 +08:00
'meta.import.ts string.quoted.single.ts',
2022-03-16 15:21:50 +08:00
'meta.import.ts string.quoted.double.ts',
'meta.import.tsx string.quoted.single.tsx',
'meta.import.tsx string.quoted.double.tsx'
2022-03-14 15:05:57 +08:00
],
settings: {
fontStyle: 'underline',
foreground: vars.common
}
},
{
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'
],
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: [
'support.type.object.console.js',
'support.type.object.module.js',
2018-12-07 10:34:23 +08:00
'support.type.object.dom.js',
2018-12-06 16:27:50 +08:00
'support.constant.math',
2021-11-09 12:01:14 +08:00
'support.constant.json',
2018-12-11 14:24:03 +08:00
'meta.class.extends.js variable.other.readwrite.js',
'meta.function-call.static.without-arguments.js variable.other.class.js',
2018-12-11 16:58:54 +08:00
'meta.function-call.static.with-arguments.js variable.other.class.js',
2018-12-12 11:09:11 +08:00
'meta.property.class.js variable.other.class.js'
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: [
'punctuation.definition.template-expression.begin.ts',
2022-03-14 15:05:57 +08:00
'punctuation.definition.template-expression.end.ts',
'punctuation.definition.template-expression.begin.js',
'punctuation.definition.template-expression.end.js'
2018-12-11 15:33:30 +08:00
],
settings: {
fontStyle: '',
foreground: '#ff5370'
}
},
2022-03-14 15:05:57 +08:00
{
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',
2022-03-16 15:21:50 +08:00
'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'
2022-03-14 15:05:57 +08:00
],
settings: {
foreground: vars.common
}
},
{
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'
],
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: [
'constant.other.object.key.js string.unquoted.label.js',
2021-11-09 12:01:14 +08:00
'constant.other.object.key.js string.quoted.label.js',
2022-03-14 15:05:57 +08:00
'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',
2021-11-09 12:01:14 +08:00
'meta.objectliteral.js meta.object.member.js meta.object-literal.key.js'
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',
scope: [
'entity.name.tag.jsx support.class.component.jsx',
'entity.name.tag.tsx support.class.component.tsx'
],
settings: {
fontStyle: 'normal',
foreground: '#FF5370'
}
},
{
name: 'Tag Content String',
scope: ['meta.tag.tsx meta.tag.without-attributes.tsx meta.jsx.children.tsx'],
settings: {
foreground: '#546e7a'
}
2018-12-01 21:17:55 +08:00
}
]