Open History to see the last commit
1import type { EditorId } from "@t3tools/contracts";
2import { FolderClosedIcon } from "lucide-react";
3
4import { isMacPlatform, isWindowsPlatform } from "~/lib/utils";
5import {
6 AntigravityIcon,
7 CursorIcon,
8 DevinIcon,
9 FileExplorerIcon,
10 FinderIcon,
11 type Icon,
12 KiroIcon,
13 TraeIcon,
14 VisualStudioCode,
15 VisualStudioCodeInsiders,
16 VSCodium,
17 Zed,
18} from "./Icons";
19import {
20 AquaIcon,
21 CLionIcon,
22 DataGripIcon,
23 DataSpellIcon,
24 GoLandIcon,
25 IntelliJIdeaIcon,
26 PhpStormIcon,
27 PyCharmIcon,
28 RiderIcon,
29 RubyMineIcon,
30 RustRoverIcon,
31 WebStormIcon,
32} from "./JetBrainsIcons";
33
34export interface EditorIconOption {
35 readonly Icon: Icon;
36 readonly value: EditorId;
37 readonly kind: "brand" | "generic";
38}
39
40/** Editor logos in picker order. */
41export function editorIconOptions(platform: string): ReadonlyArray<EditorIconOption> {
42 return [
43 {
44 Icon: CursorIcon,
45 value: "cursor",
46 kind: "brand",
47 },
48 {
49 Icon: TraeIcon,
50 value: "trae",
51 kind: "brand",
52 },
53 {
54 Icon: KiroIcon,
55 value: "kiro",
56 kind: "brand",
57 },
58 {
59 Icon: VisualStudioCode,
60 value: "vscode",
61 kind: "brand",
62 },
63 {
64 Icon: VisualStudioCodeInsiders,
65 value: "vscode-insiders",
66 kind: "brand",
67 },
68 {
69 Icon: VSCodium,
70 value: "vscodium",
71 kind: "brand",
72 },
73 {
74 Icon: Zed,
75 value: "zed",
76 kind: "brand",
77 },
78 {
79 Icon: AntigravityIcon,
80 value: "antigravity",
81 kind: "brand",
82 },
83 {
84 Icon: DevinIcon,
85 value: "devin",
86 kind: "brand",
87 },
88 {
89 Icon: IntelliJIdeaIcon,
90 value: "idea",
91 kind: "brand",
92 },
93 {
94 Icon: AquaIcon,
95 value: "aqua",
96 kind: "brand",
97 },
98 {
99 Icon: CLionIcon,
100 value: "clion",
101 kind: "brand",
102 },
103 {
104 Icon: DataGripIcon,
105 value: "datagrip",
106 kind: "brand",
107 },
108 {
109 Icon: DataSpellIcon,
110 value: "dataspell",
111 kind: "brand",
112 },
113 {
114 Icon: GoLandIcon,
115 value: "goland",
116 kind: "brand",
117 },
118 {
119 Icon: PhpStormIcon,
120 value: "phpstorm",
121 kind: "brand",
122 },
123 {
124 Icon: PyCharmIcon,
125 value: "pycharm",
126 kind: "brand",
127 },
128 {
129 Icon: RiderIcon,
130 value: "rider",
131 kind: "brand",
132 },
133 {
134 Icon: RubyMineIcon,
135 value: "rubymine",
136 kind: "brand",
137 },
138 {
139 Icon: RustRoverIcon,
140 value: "rustrover",
141 kind: "brand",
142 },
143 {
144 Icon: WebStormIcon,
145 value: "webstorm",
146 kind: "brand",
147 },
148 {
149 Icon: isMacPlatform(platform)
150 ? FinderIcon
151 : isWindowsPlatform(platform)
152 ? FileExplorerIcon
153 : FolderClosedIcon,
154 value: "file-manager",
155 kind: isMacPlatform(platform) || isWindowsPlatform(platform) ? "brand" : "generic",
156 },
157 ];
158}