From 0dabbb69ebc84ab29ebcc9c20ba0b3ea09c08a69 Mon Sep 17 00:00:00 2001 From: Billy Ceskavich Date: Wed, 15 Aug 2018 07:13:42 -0400 Subject: [PATCH] JavaScript and TypeScript constant definitions are colored cyan --- src/settings/tokens/languages/javascript.ts | 11 +++++++++++ src/settings/tokens/languages/typescript.ts | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/settings/tokens/languages/javascript.ts b/src/settings/tokens/languages/javascript.ts index c29b216..1074c01 100644 --- a/src/settings/tokens/languages/javascript.ts +++ b/src/settings/tokens/languages/javascript.ts @@ -3,6 +3,7 @@ import TokenSettings from '../TokenSettings'; export default (colors: Colors): TokenSettings[] => [ prototypeProperty(colors), + constants(colors), specialLanguageClasses(colors), classesInUse(colors), ...functions(colors) @@ -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', diff --git a/src/settings/tokens/languages/typescript.ts b/src/settings/tokens/languages/typescript.ts index e8a2aef..4876a76 100644 --- a/src/settings/tokens/languages/typescript.ts +++ b/src/settings/tokens/languages/typescript.ts @@ -3,6 +3,7 @@ import TokenSettings from '../TokenSettings'; export default (colors: Colors): TokenSettings[] => [ prototypeProperty(colors), + constants(colors), specialLanguageClasses(colors), classesInUse(colors), ...functions(colors), @@ -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',