Skip to content

Commit

Permalink
Fix missing shell colors
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHZhang committed Apr 6, 2023
1 parent b448946 commit 334f799
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 42 deletions.
43 changes: 23 additions & 20 deletions src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,6 @@ const theme: ColorTheme = {
name: 'red (potentially dangerous operations)',
scope: [
'constant.character.escape',
'punctuation.definition.template-expression.begin', // Typescript { in ${} template string
'punctuation.definition.template-expression.end', // Typescript } in ${} template string
'keyword.operator.comparison',
'keyword.operator.conditional',
'keyword.operator.definiteassignment', // Typescript null assertion (public someProp!: string)
Expand All @@ -408,6 +406,9 @@ const theme: ColorTheme = {
'keyword.operator.relational',
'keyword.operator.ternary',
'keyword.operator.type',
'punctuation.definition.template-expression.begin', // Typescript { in ${} template string
'punctuation.definition.template-expression.end', // Typescript } in ${} template string
'punctuation.definition.variable.shell', // ${} (shell)
],
settings: {
foreground: colors.red,
Expand Down Expand Up @@ -444,9 +445,10 @@ const theme: ColorTheme = {
{
name: 'variable declaration and parameters',
scope: [
specificity('source.toml', 'support.type.property-name.toml'), // TOML inline table keys
specificity('source.toml', 'meta.table', 'support.type.property-name.toml'), // TOML inline table keys
'entity.name.variable.local', // Local variable (C#)
'meta.property-value.css',
'variable.language.special', // $? (shell)
'variable.other',
'variable.parameter',
'variable.key.table',
Expand All @@ -458,19 +460,22 @@ const theme: ColorTheme = {
{
name: 'struct/object properties',
scope: [
specificity('meta.table', 'support.type.property-name.table'),
specificity('source.python', 'variable.parameter.function-call.python'), // TODO: broken Kwargs (python)
'constant.other.option', // --opt (shell)
'entity.name.variable.field', // class field (C#)
'entity.other.attribute-name',
'meta.braces.hcl', // Terraform property
'meta.object-literal.key',
'meta.scope.case-pattern.shell', // --help) (shell)
'support.resource.attribute',
'support.variable.property',
'variable.key',
'variable.object.property',
'variable.other.enummember',
'variable.other.property',
'variable.other.constant.property',
'variable.other.object.property',
'variable.object.property',
'support.resource.attribute',
'support.variable.property',
'entity.other.attribute-name',
'meta.object-literal.key',
'meta.braces.hcl', // Terraform property
'entity.name.variable.field', // class field (C#)
'variable.parameter.function-call.python', // Kwargs (python)
],
settings: {
foreground: colors.violet,
Expand All @@ -487,10 +492,13 @@ const theme: ColorTheme = {
'keyword.operator.bitwise', // <<
'keyword.operator.borrow', // &
'keyword.operator.decrement',
'keyword.operator.dereference', // *
'keyword.operator.dereference', // * (rust)
'keyword.operator.expansion', // * (shell)
'keyword.operator.heredoc', // << (shell)
'keyword.operator.increment',
'keyword.operator.math',
'keyword.operator.range', // ..Default::default (rust)
'keyword.operator.redirect', // 1>&2 (Shell)
'keyword.operator.rest', // (...args) => {} (ts)
'keyword.operator.spread', // ...props (ts)
'markup.underline.link',
Expand All @@ -505,6 +513,7 @@ const theme: ColorTheme = {
{
name: 'booleans, constants',
scope: [
specificity('string.quoted.double.shell', 'meta.parameter-expansion'), // "${VAR[0]}" (shell)
'constant.language.boolean',
'constant.language',
'constant.numeric',
Expand Down Expand Up @@ -564,13 +573,15 @@ const theme: ColorTheme = {
'punctuation.separator',
'punctuation.brackets.angle', // fn<Generic>() (rust/ts)
'punctuation.comma', // commas
'punctuation.definition.case-pattern', // ) (shell)
'punctuation.definition.link.title.begin', // [link](url) (markdown)
'punctuation.definition.link.title.end', // [link](url) (markdown)
'punctuation.definition.metadata', // [link](url) (markdown)
'punctuation.definition.tag.begin', // <div (jsx)
'punctuation.definition.tag.end', // div> (jsx)
'punctuation.definition.typeparameters', // Record<string, any> (ts)
'punctuation.definition.table.inline', // {} (toml)
'punctuation.section.array.shell', // [] (shell)
],
settings: {
foreground: colors.cyan,
Expand All @@ -584,14 +595,6 @@ const theme: ColorTheme = {
foreground: colors.pastelGreen,
},
},
{
name: 'toml table headers',
scope: 'meta.table support.type.property-name.table',
settings: {
foreground: '#c77ddd',
fontStyle: 'bold',
},
},
],
};

Expand Down
47 changes: 25 additions & 22 deletions themes/fullmetal-color-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@
"name": "red (potentially dangerous operations)",
"scope": [
"constant.character.escape",
"punctuation.definition.template-expression.begin",
"punctuation.definition.template-expression.end",
"keyword.operator.comparison",
"keyword.operator.conditional",
"keyword.operator.definiteassignment",
Expand All @@ -303,7 +301,10 @@
"keyword.operator.question",
"keyword.operator.relational",
"keyword.operator.ternary",
"keyword.operator.type"
"keyword.operator.type",
"punctuation.definition.template-expression.begin",
"punctuation.definition.template-expression.end",
"punctuation.definition.variable.shell"
],
"settings": {
"foreground": "#ff4762"
Expand Down Expand Up @@ -344,9 +345,10 @@
{
"name": "variable declaration and parameters",
"scope": [
"source.toml support.type.property-name.toml",
"source.toml meta.table support.type.property-name.toml",
"entity.name.variable.local",
"meta.property-value.css",
"variable.language.special",
"variable.other",
"variable.parameter",
"variable.key.table"
Expand All @@ -358,19 +360,22 @@
{
"name": "struct/object properties",
"scope": [
"meta.table support.type.property-name.table",
"source.python variable.parameter.function-call.python",
"constant.other.option",
"entity.name.variable.field",
"entity.other.attribute-name",
"meta.braces.hcl",
"meta.object-literal.key",
"meta.scope.case-pattern.shell",
"support.resource.attribute",
"support.variable.property",
"variable.key",
"variable.object.property",
"variable.other.enummember",
"variable.other.property",
"variable.other.constant.property",
"variable.other.object.property",
"variable.object.property",
"support.resource.attribute",
"support.variable.property",
"entity.other.attribute-name",
"meta.object-literal.key",
"meta.braces.hcl",
"entity.name.variable.field",
"variable.parameter.function-call.python"
"variable.other.object.property"
],
"settings": {
"foreground": "#c77ddd"
Expand All @@ -388,9 +393,12 @@
"keyword.operator.borrow",
"keyword.operator.decrement",
"keyword.operator.dereference",
"keyword.operator.expansion",
"keyword.operator.heredoc",
"keyword.operator.increment",
"keyword.operator.math",
"keyword.operator.range",
"keyword.operator.redirect",
"keyword.operator.rest",
"keyword.operator.spread",
"markup.underline.link",
Expand All @@ -405,6 +413,7 @@
{
"name": "booleans, constants",
"scope": [
"string.quoted.double.shell meta.parameter-expansion",
"constant.language.boolean",
"constant.language",
"constant.numeric",
Expand Down Expand Up @@ -463,13 +472,15 @@
"punctuation.separator",
"punctuation.brackets.angle",
"punctuation.comma",
"punctuation.definition.case-pattern",
"punctuation.definition.link.title.begin",
"punctuation.definition.link.title.end",
"punctuation.definition.metadata",
"punctuation.definition.tag.begin",
"punctuation.definition.tag.end",
"punctuation.definition.typeparameters",
"punctuation.definition.table.inline"
"punctuation.definition.table.inline",
"punctuation.section.array.shell"
],
"settings": {
"foreground": "#3dacb4"
Expand All @@ -482,14 +493,6 @@
"fontStyle": "bold",
"foreground": "#add692"
}
},
{
"name": "toml table headers",
"scope": "meta.table support.type.property-name.table",
"settings": {
"foreground": "#c77ddd",
"fontStyle": "bold"
}
}
]
}

0 comments on commit 334f799

Please sign in to comment.