From bc649fa0aadcd7d13200920d90b4f81943c09869 Mon Sep 17 00:00:00 2001 From: Michael Fix Date: Tue, 14 Apr 2020 18:13:30 -0700 Subject: [PATCH] allow setting variable 2 and 3 in config (#988) --- components/Themes/index.js | 10 +++++++--- lib/constants.js | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/components/Themes/index.js b/components/Themes/index.js index 9de6f3c..3630cf0 100644 --- a/components/Themes/index.js +++ b/components/Themes/index.js @@ -142,11 +142,15 @@ class Themes extends React.PureComponent { :global(.cm-comment) { color: ${highlights.comment} !important; } - :global(.cm-variable), - :global(.cm-variable-2), - :global(.cm-variable-3) { + :global(.cm-variable) { color: ${highlights.variable} !important; } + :global(.cm-variable-2) { + color: ${highlights.variable2 || highlights.variable} !important; + } + :global(.cm-variable-3) { + color: ${highlights.variable3 || highlights.variable} !important; + } :global(.cm-number) { color: ${highlights.number} !important; } diff --git a/lib/constants.js b/lib/constants.js index 57c64eb..d67cfb9 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -152,7 +152,9 @@ export const THEMES = [ highlights: { background: '#282a36', text: '#f8f8f2', - variable: '#fff', + variable: '#50fa7b', + variable2: 'white', + variable3: '#ffb86c', attribute: '#50fa7b', definition: '#50fa7b', keyword: '#ff79c6',