Skip to content

Commit 5a53d55

Browse files
committed
chore: use one dard pro theme
1 parent 88f7b25 commit 5a53d55

File tree

1 file changed

+35
-19
lines changed

1 file changed

+35
-19
lines changed

src/hooks/monaco/index.ts

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -195,35 +195,51 @@ function initializeMonaco() {
195195
['{', '}'],
196196
['[', ']'],
197197
['(', ')'],
198-
['<', '>'],
199198
],
200199
});
200+
201+
enum colorType {
202+
chalky= '#E5C07B',
203+
coral= '#e06c75',
204+
dark= '#5c6370',
205+
error= '#f44747',
206+
fountainBlue= '#56b6c2',
207+
green= '#98c379',
208+
invalid= '#ffffff',
209+
lightDark= '#7f848e',
210+
lightWhite= '#abb2bf',
211+
malibu= '#61afef',
212+
purple= '#c678dd',
213+
whiskey= '#d19a66',
214+
deepRed= '#BE5046',
215+
}
201216
// Define a new theme that contains only rules that match this language
202217
monaco.editor.defineTheme('pltheme', {
203218
base: 'vs-dark',
204219
inherit: true,
205-
colors: {},
220+
colors: {
221+
},
206222
rules: [
207-
{ token: 'keyword', foreground: '63a7eb' },
208-
{ token: 'keyword.control', foreground: 'ce63eb' },
209-
{ token: 'operator', foreground: '000000' },
210-
{ token: 'namespace', foreground: '66afce' },
223+
{ token: 'keyword', foreground: colorType.purple },
224+
{ token: 'keyword.control', foreground: colorType.purple },
225+
{ token: 'operator', foreground: colorType.fountainBlue },
226+
{ token: 'namespace', foreground: colorType.chalky },
211227

212-
{ token: 'type', foreground: '1db010' },
213-
{ token: 'struct', foreground: '1db010', fontStyle: 'underline' },
214-
{ token: 'class', foreground: '0000ff', fontStyle: 'bold' },
215-
{ token: 'interface', foreground: '007700', fontStyle: 'bold' },
216-
{ token: 'enum', foreground: '0077ff', fontStyle: 'bold' },
217-
{ token: 'typeParameter', foreground: '1db010' },
218-
{ token: 'function', foreground: '94763a' },
228+
{ token: 'type', foreground: colorType.chalky },
229+
{ token: 'struct', foreground: colorType.chalky },
230+
{ token: 'class', foreground: colorType.chalky },
231+
{ token: 'interface', foreground: colorType.chalky },
232+
{ token: 'enum', foreground: colorType.fountainBlue },
233+
{ token: 'typeParameter', foreground: colorType.purple },
234+
{ token: 'function', foreground: colorType.malibu },
219235

220-
{ token: 'member', foreground: '94763a' },
221-
{ token: 'macro', foreground: '615a60' },
222-
{ token: 'variable', foreground: '3e5bbf' },
223-
{ token: 'parameter', foreground: '3e5bbf' },
224-
{ token: 'property', foreground: '3e5bbf' },
236+
{ token: 'member', foreground: colorType.coral },
237+
{ token: 'macro', foreground: colorType.whiskey, fontStyle: 'bold' },
238+
{ token: 'variable', foreground: colorType.coral },
239+
{ token: 'parameter', foreground: colorType.coral },
240+
{ token: 'property', foreground: colorType.coral },
225241
{ token: 'label', foreground: '615a60' },
226-
{ token: 'method', foreground: '94763a', fontStyle: 'bold' },
242+
{ token: 'method', foreground: colorType.malibu, fontStyle: 'bold' },
227243

228244
{ token: 'type.static', fontStyle: 'bold' },
229245
{ token: 'class.static', foreground: 'ff0000', fontStyle: 'bold' },

0 commit comments

Comments
 (0)