-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathidea.ts
168 lines (166 loc) · 4.33 KB
/
idea.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
export const generateInteliJCompletionSpec = (
name: string,
editorName: string
): Fig.Spec => {
return {
name,
description: `${editorName} cli`,
args: {
name: "path",
template: "filepaths",
},
subcommands: [
{
name: "diff",
description:
"Open the diff viewer to see the differences between two specified files",
args: [
{
name: "path",
template: "filepaths",
},
{
name: "path2",
template: "filepaths",
},
{
name: "path3-optional",
template: "filepaths",
},
],
},
{
name: "merge",
description: "Open the Merge dialog to merge the specified files",
args: [
{
name: "path",
template: "filepaths",
},
{
name: "path2",
template: "filepaths",
},
{
name: "base-optional",
template: "filepaths",
},
],
},
{
name: "format",
description: "Apply code style formatting to the specified files",
args: {
name: "path...",
template: "filepaths",
},
options: [
{
name: "-h",
description: "Show help for format command",
},
{
name: ["-m", "-mask"],
description:
"Specify a comma-separated list of file masks that define the files to be processed",
},
{
name: ["-r", "-R"],
description: "Process specified directories recursively",
},
{
name: ["-s", "-settings"],
description:
"Specify the code style settings file to use for formatting",
},
{
name: "-allowDefaults",
description:
"Use the default code style settings when the code style is not defined for a file or a group of files",
},
{
name: "-charset",
description:
"Preserve encoding and enforce the charset for reading and writing source files",
},
{
name: ["-d", "-dry"],
description: "Run the formatter in the validation mode",
},
],
},
{
name: "inspect",
description: "Perform code inspection on the specified project",
args: [
{
name: "project",
template: "folders",
},
{
name: "inspection-profile",
template: "filepaths",
},
{
name: "output",
template: "filepaths",
},
],
options: [
{
name: "-changes",
description: "Run inspections only on local uncommitted changes",
},
{
name: "-d",
description:
"Specify the full path to the subdirectory if you don't want to inspect the whole project",
},
{
name: "-format",
description:
"Specify the format of the output file with inspection results",
},
{
name: "-v",
description: "Set the verbosity level of the output",
},
],
},
{
name: "installPlugins",
description:
"Install plugins by plugin ID from JetBrains Marketplace or a custom plugin repository",
args: [
{
name: "plugin-id",
},
{
name: "repository-url ",
},
],
},
],
options: [
{
name: "nosplash",
description: `Do not show the splash screen when loading ${editorName}`,
},
{
name: "dontReopenProjects",
description: "Do not reopen projects and show the welcome screen",
},
{
name: "disableNonBundledPlugins",
description: "Do not load manually installed plugins",
},
{
name: "--wait",
description:
"Wait for the files to be closed before returning to the command prompt",
},
],
};
};
const completionSpec = generateInteliJCompletionSpec("idea", "InteliJ IDEA");
export default completionSpec;