Skip to content

Commit

Permalink
JavaScript and TypeScript constant definitions are colored cyan
Browse files Browse the repository at this point in the history
  • Loading branch information
Billy Ceskavich committed Aug 15, 2018
1 parent 0ca60f0 commit 0dabbb6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/settings/tokens/languages/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import TokenSettings from '../TokenSettings';

export default (colors: Colors): TokenSettings[] => [
prototypeProperty(colors),
constants(colors),
specialLanguageClasses(colors),
classesInUse(colors),
...functions(colors)
Expand All @@ -16,6 +17,16 @@ function prototypeProperty({ base }: Colors): TokenSettings {
};
}

function constants({ base }: Colors): TokenSettings {
return {
name: 'JavaScript constant definitions',
scope: ['variable.other.constant.js'],
settings: {
foreground: base.cyan
}
};
}

function specialLanguageClasses({ base }: Colors): TokenSettings {
return {
name: 'JavaScript language classes',
Expand Down
11 changes: 11 additions & 0 deletions src/settings/tokens/languages/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import TokenSettings from '../TokenSettings';

export default (colors: Colors): TokenSettings[] => [
prototypeProperty(colors),
constants(colors),
specialLanguageClasses(colors),
classesInUse(colors),
...functions(colors),
Expand All @@ -17,6 +18,16 @@ function prototypeProperty({ base }: Colors): TokenSettings {
};
}

function constants({ base }: Colors): TokenSettings {
return {
name: 'TypeScript constant definitions',
scope: ['variable.other.constant.ts'],
settings: {
foreground: base.cyan
}
};
}

function specialLanguageClasses({ base }: Colors): TokenSettings {
return {
name: 'TypeScript language classes',
Expand Down

0 comments on commit 0dabbb6

Please sign in to comment.