Skip to content

Commit 5855fe0

Browse files
committed
feat(catppuccin support): added support for catppuccin themes
1 parent ed7ac6f commit 5855fe0

10 files changed

Lines changed: 3722 additions & 3761 deletions

File tree

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"type": "extensionHost",
1111
"request": "launch",
1212
"args": ["${workspaceFolder}/out", "--extensionDevelopmentPath=${workspaceFolder}"],
13-
"outFiles": ["${workspaceFolder}/out/**/*.js"]
14-
// "preLaunchTask": "${defaultBuildTask}"
13+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
14+
"preLaunchTask": "${defaultBuildTask}"
1515
},
1616
{
1717
"name": "Run Extension Tests",

docs/SUPPORTED-THEMES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@
2727
- [One Dark Pro Monokai Darker Theme](https://marketplace.visualstudio.com/items?itemName=eserozvataf.one-dark-pro-monokai-darker)
2828
- [Visual Studio 2019 Dark plus syntax](https://marketplace.visualstudio.com/items?itemName=skyletoft.theme-custom-colour)
2929
- [Nord](https://marketplace.visualstudio.com/items?itemName=arcticicestudio.nord-visual-studio-code)
30+
- [Catppuccin Mocha](https://marketplace.visualstudio.com/items?itemName=Catppuccin.catppuccin-vsc)
31+
- [Catppuccin Macchiato](https://marketplace.visualstudio.com/items?itemName=Catppuccin.catppuccin-vsc)
32+
- [Catppuccin Frappé](https://marketplace.visualstudio.com/items?itemName=Catppuccin.catppuccin-vsc)
33+
- [Catppuccin Latte](https://marketplace.visualstudio.com/items?itemName=Catppuccin.catppuccin-vsc)
3034
- All the default ones
3135
- Generic Fallback

src/ts/interfaces/themes.ts

Lines changed: 7 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,3 @@
1-
export type SupportedThemes = [
2-
| 'Abyss'
3-
| 'Angular Theme'
4-
| 'Atom One Dark'
5-
| 'Ayu Dark'
6-
| 'Ayu Dark Bordered'
7-
| 'Ayu Light'
8-
| 'Ayu Light Bordered'
9-
| 'Ayu Mirage'
10-
| 'Ayu Mirage Bordered'
11-
| 'Community Material Theme'
12-
| 'Community Material Theme Darker'
13-
| 'Community Material Theme Darker High Contrast'
14-
| 'Community Material Theme High Contrast'
15-
| 'Community Material Theme Lighter'
16-
| 'Community Material Theme Lighter High Contrast'
17-
| 'Community Material Theme Ocean'
18-
| 'Community Material Theme Ocean High Contrast'
19-
| 'Community Material Theme Palenight'
20-
| 'Community Material Theme Palenight High Contrast'
21-
| 'Darcula'
22-
| 'Darcula - Black Edition'
23-
| 'Darcula - WebStorm Edition'
24-
| 'Dark (Visual Studio - CC++)'
25-
| 'Dark (Visual Studio)'
26-
| 'Dark High Contrast'
27-
| 'Dark Modern'
28-
| 'Dark Purple - Black Edition'
29-
| 'Dark Purple - Webstorm'
30-
| 'dark-plus-syntax'
31-
| 'dark-plus-syntax (high contrast)'
32-
| 'Default Dark+'
33-
| 'Default Dark Modern'
34-
| 'Default Light+'
35-
| 'Dracula'
36-
| 'Dracula Soft'
37-
| 'GitHub Dark'
38-
| 'GitHub Dark Colorblind (Beta)'
39-
| 'GitHub Dark Default'
40-
| 'GitHub Dark Dimmed'
41-
| 'GitHub Dark High Contrast'
42-
| 'GitHub Light'
43-
| 'GitHub Light Colorblind (Beta)'
44-
| 'GitHub Light Default'
45-
| 'Github Light High Contrast'
46-
| 'index.ts'
47-
| 'Kimbie Dark'
48-
| 'Light (Visual Studio - CC++)'
49-
| 'Light (Visual Studio)'
50-
| 'Light High Contrast'
51-
| 'light-plus-syntax'
52-
| 'light-plus-syntax (high contrast)'
53-
| 'Material Theme'
54-
| 'Material Theme Darker'
55-
| 'Material Theme Darker High Contrast'
56-
| 'Material Theme Lighter'
57-
| 'Material Theme Lighter High Contrast'
58-
| 'Material Theme Ocean'
59-
| 'Material Theme Ocean High Contrast'
60-
| 'Material Theme Palenight'
61-
| 'Material Theme Palenight High Contrast'
62-
| 'Monokai'
63-
| 'Monokai Classic'
64-
| 'Monokai Dimmed'
65-
| 'Monokai Pro'
66-
| 'Monokai Pro (Filter Machine)'
67-
| 'Monokai Pro (Filter Octagon)'
68-
| 'Monokai Pro (Filter Ristretto)'
69-
| 'Monokai Pro (Filter Spectrum)'
70-
| 'Monokai++'
71-
| 'Monokai++Dark'
72-
| 'Monokai++Unified'
73-
| 'Night Owl'
74-
| 'Night Owl (No Italics)'
75-
| 'Night Owl Light'
76-
| 'Night Owl Light (No Italics)'
77-
| 'Nord'
78-
| 'One Dark Pro'
79-
| 'One Dark Pro Darker'
80-
| 'One Dark Pro Flat'
81-
| 'One Dark Pro Mix'
82-
| 'One Monokai'
83-
| 'Quiet Light'
84-
| 'Red'
85-
| 'Solarized Dark'
86-
| 'Solarized Light'
87-
// eslint-disable-next-line @typescript-eslint/quotes
88-
| "SynthWave '84"
89-
| 'Tomorrow Night Blue'
90-
| 'Visual Studio 2019 Dark plus syntax'
91-
| 'Winter is Coming (Dark Black - No Italics)'
92-
| 'Winter is Coming (Dark Black)'
93-
| 'Winter is Coming (Dark Blue - No Italics)'
94-
| 'Winter is Coming (Dark Blue)'
95-
| 'Winter is Coming (Light)'
96-
| 'Winter is Coming (Lights - No Italics)',
97-
];
98-
991
export const supportedThemes = [
1002
'Abyss',
1013
'Atom One Dark',
@@ -105,6 +7,10 @@ export const supportedThemes = [
1057
'Ayu Light Bordered',
1068
'Ayu Mirage',
1079
'Ayu Mirage Bordered',
10+
'Catppuccin Frappé',
11+
'Catppuccin Latte',
12+
'Catppuccin Macchiato',
13+
'Catppuccin Mocha',
10814
'Community Material Theme',
10915
'Community Material Theme Darker',
11016
'Community Material Theme Darker High Contrast',
@@ -191,4 +97,6 @@ export const supportedThemes = [
19197
'Winter is Coming (Dark Blue)',
19298
'Winter is Coming (Light)',
19399
'Winter is Coming (Lights - No Italics)',
194-
] as unknown as SupportedThemes[];
100+
] as const;
101+
102+
export type SupportedThemes = (typeof supportedThemes)[number];
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { Scopes } from '../../interfaces/custom-scopes-per-rule';
2+
3+
export = {
4+
'constant.character.entity.html': '#CA9EE6',
5+
'constant.numeric.angular-directive': '#E5C890',
6+
'entity.name.tag.other.html': '#8CAAEE',
7+
'keyword.operator.entity.html': '#81C8BE',
8+
'keyword.operator.expression.let.js': '#CA9EE6',
9+
'keyword.operator.punctuation': '#CA9EE6',
10+
'string.regexp': '#F4B8E4',
11+
'support.type.object.html-attribute': '#E5C890',
12+
} as Scopes;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { Scopes } from '../../interfaces/custom-scopes-per-rule';
2+
3+
export = {
4+
'constant.character.entity.html': '#8839EF',
5+
'constant.numeric.angular-directive': '#EA76CB',
6+
'entity.name.tag.other.html': '#1E66F5',
7+
'keyword.operator.entity.html': '#8839EF',
8+
'keyword.operator.expression.let.js': '#8839EF',
9+
'keyword.operator.punctuation': '#8839EF',
10+
'string.regexp': '#EA76CB',
11+
'support.type.object.html-attribute': '#DF8E1D',
12+
} as Scopes;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { Scopes } from '../../interfaces/custom-scopes-per-rule';
2+
3+
export = {
4+
'constant.character.entity.html': '#C6A0F6',
5+
'constant.numeric.angular-directive': '#EED49F',
6+
'entity.name.tag.other.html': '#8AADF4',
7+
'keyword.operator.entity.html': '#8BD5CA',
8+
'keyword.operator.expression.let.js': '#C6A0F6',
9+
'keyword.operator.punctuation': '#8BD5CA',
10+
'string.regexp': '#C6A0F6',
11+
'support.type.object.html-attribute': '#EED49F',
12+
} as Scopes;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { Scopes } from '../../interfaces/custom-scopes-per-rule';
2+
3+
export = {
4+
'constant.character.entity.html': '#F38BA8',
5+
'constant.numeric.angular-directive': '#94E2D5',
6+
'entity.name.tag.other.html': '#89B4FA',
7+
'keyword.operator.entity.html': '#FAB387',
8+
'keyword.operator.expression.let.js': '#CBA6F7',
9+
'keyword.operator.punctuation': '#94E2D5',
10+
'string.regexp': '#CBA6F7',
11+
'support.type.object.html-attribute': '#F9E2AF',
12+
} as Scopes;

src/ts/themes/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { LegacyScopes } from '../interfaces/custom-scopes-per-rule';
22
import { supportedThemes } from '../interfaces/themes';
33
import { getSettingsJSON, setSettingsJSON } from '../settings';
44

5-
import * as JSONC from 'jsonc-parser';
5+
import * as jsonC from 'jsonc-parser';
66
import * as vscode from 'vscode';
77

88
import type { GeneratedTheme, Scopes } from '../interfaces/custom-scopes-per-rule';
@@ -11,7 +11,7 @@ import type { Debug } from '../tools';
1111

1212
const fetchThemeColors = async (): Promise<GeneratedTheme[]> => {
1313
await vscode.commands.executeCommand('workbench.action.generateColorTheme');
14-
const content = JSONC.parse(vscode.window.activeTextEditor?.document.getText() as string);
14+
const content = jsonC.parse(vscode.window.activeTextEditor?.document.getText() as string);
1515
await vscode.commands.executeCommand('editor.action.selectAll');
1616
await vscode.commands.executeCommand('editor.action.clipboardCutAction');
1717
await vscode.commands.executeCommand('workbench.action.closeActiveEditor');

0 commit comments

Comments
 (0)