-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathcmake-tools.lua
More file actions
306 lines (277 loc) · 6.16 KB
/
cmake-tools.lua
File metadata and controls
306 lines (277 loc) · 6.16 KB
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
--- The cmake-tools plugin for neovim v0.7.0+.
-- This plugin is intended to support cmake integration in neovim.
local cmake_tools = require("cmake-tools")
---------------- Commands ------------------
--- CMake
vim.api.nvim_create_user_command(
"CMakeGenerate", -- name
cmake_tools.generate, -- command
{ -- opts
nargs = "*",
bang = true,
desc = "CMake configure",
}
)
--- CMake clean
vim.api.nvim_create_user_command(
"CMakeClean", -- name
cmake_tools.clean, -- command
{ -- opts
nargs = 0,
desc = "Clean CMake result",
}
)
--- CMake build
vim.api.nvim_create_user_command(
"CMakeBuild", -- name
cmake_tools.build, -- command
{ -- opts
nargs = "*",
bang = true,
desc = "CMake build",
}
)
--- CMake quick build
vim.api.nvim_create_user_command(
"CMakeQuickBuild", -- name
cmake_tools.quick_build, -- command
{ -- opts
nargs = "?",
desc = "CMake quick build",
}
)
--- CMake install
vim.api.nvim_create_user_command(
"CMakeInstall", -- name
cmake_tools.install, -- command
{ -- opts
nargs = "*",
desc = "CMake install",
}
)
--- CMake stop
vim.api.nvim_create_user_command(
"CMakeStopExecutor", -- name
cmake_tools.stop_executor, -- command
{ -- opts
desc = "CMake stop executor",
}
)
vim.api.nvim_create_user_command(
"CMakeStopRunner", -- name
cmake_tools.stop_runner, -- command
{ -- opts
desc = "CMake stop runner",
}
)
--- CMake close executor
vim.api.nvim_create_user_command(
"CMakeCloseExecutor", -- name
cmake_tools.close_executor, -- command
{ -- opts
desc = "Close CMake executor window",
}
)
--- CMake close runner
vim.api.nvim_create_user_command(
"CMakeCloseRunner", -- name
cmake_tools.close_runner, -- command
{ -- opts
desc = "Close CMake runner window",
}
)
--- CMake open executor
vim.api.nvim_create_user_command(
"CMakeOpenExecutor", -- name
cmake_tools.open_executor, -- command
{ -- opts
desc = "Open CMake executor window",
}
)
--- CMake open runner
vim.api.nvim_create_user_command(
"CMakeOpenRunner", -- name
cmake_tools.open_runner, -- command
{ -- opts
desc = "Open CMake runner window",
}
)
--- CMake open cache
vim.api.nvim_create_user_command(
"CMakeOpenCache", -- name
cmake_tools.open_cache, -- command
{ -- opts
desc = "Open CMakeCache.txt",
}
)
--- CMake run
vim.api.nvim_create_user_command(
"CMakeRun", -- name
cmake_tools.run, -- command
{ -- opts
nargs = "*",
desc = "CMake run",
}
)
--- CMake quick run
vim.api.nvim_create_user_command(
"CMakeQuickRun", -- name
cmake_tools.quick_run, -- command
{ -- opts
nargs = "*",
desc = "CMake quick run",
}
)
--- CMake run current file
vim.api.nvim_create_user_command(
"CMakeRunCurrentFile", -- name
cmake_tools.run_current_file, -- command
{ -- opts
nargs = "*",
desc = "CMake run current file",
}
)
--- CMake build current file
vim.api.nvim_create_user_command(
"CMakeBuildCurrentFile", -- name
cmake_tools.build_current_file, -- command
{ -- opts
nargs = "*",
desc = "CMake build current file",
}
)
--- CMake launch args
vim.api.nvim_create_user_command(
"CMakeLaunchArgs", -- name
cmake_tools.launch_args, -- command
{ -- opts
nargs = "*",
desc = "CMake launch args",
}
)
--- CMake select build type
vim.api.nvim_create_user_command(
"CMakeSelectBuildType", -- name
cmake_tools.select_build_type, -- command
{ -- opts
nargs = 0,
desc = "CMake select build type",
}
)
--- CMake select kit
vim.api.nvim_create_user_command(
"CMakeSelectKit", -- name
cmake_tools.select_kit, -- command
{ -- opts
nargs = 0,
desc = "CMake select cmake kit",
}
)
--- CMake scan for kits
vim.api.nvim_create_user_command(
"CMakeScanForKits", -- name
cmake_tools.scan_for_kits, -- command
{ -- opts
nargs = 0,
desc = "CMake scan for cmake kits",
}
)
--- CMake select configure preset
vim.api.nvim_create_user_command(
"CMakeSelectConfigurePreset", -- name
cmake_tools.select_configure_preset, -- command
{ -- opts
nargs = 0,
desc = "CMake select configure preset",
}
)
--- CMake select build preset
vim.api.nvim_create_user_command(
"CMakeSelectBuildPreset", -- name
cmake_tools.select_build_preset, -- command
{ -- opts
nargs = 0,
desc = "CMake select build preset",
}
)
--- CMake select test preset
vim.api.nvim_create_user_command(
"CMakeSelectTestPreset", -- name
cmake_tools.select_test_preset, -- command
{ -- opts
nargs = 0,
desc = "CMake select test preset",
}
)
--- CMake select build target
vim.api.nvim_create_user_command(
"CMakeSelectBuildTarget", -- name
cmake_tools.select_build_target, -- command
{ -- opts
nargs = 0,
desc = "CMake select build target",
}
)
--- CMake select launch target
vim.api.nvim_create_user_command(
"CMakeSelectLaunchTarget", -- name
cmake_tools.select_launch_target, -- command
{ -- opts
nargs = 0,
desc = "CMake select launch target",
}
)
--- CMake configure environment variables for launch target
vim.api.nvim_create_user_command(
"CMakeTargetSettings", -- name
cmake_tools.target_settings, -- command
{ -- opts
nargs = "*",
desc = "configure target settings",
}
)
--- CMake configure build environment variables
vim.api.nvim_create_user_command(
"CMakeSettings", -- name
cmake_tools.settings, -- command
{ -- opts
nargs = 0,
desc = "configure base settings",
}
)
--- CMake select cwd (source dir)
vim.api.nvim_create_user_command(
"CMakeSelectCwd", -- name
cmake_tools.select_cwd, -- command
{ -- opts
nargs = "?",
desc = "CMake select cwd",
}
)
--- CMake select build dir
vim.api.nvim_create_user_command(
"CMakeSelectBuildDir", -- name
cmake_tools.select_build_dir, -- command
{ -- opts
nargs = "?",
desc = "CMake select build dir",
}
)
--- CMake run tests
vim.api.nvim_create_user_command(
"CMakeRunTest", -- name
cmake_tools.run_test, -- command
{ -- opts
nargs = "*",
desc = "CMake run test",
}
)
--- CMake quick start
vim.api.nvim_create_user_command(
"CMakeQuickStart", -- name
require("cmake-tools.quickstart").quick_start, -- command
{ -- opts
nargs = 0,
desc = "CMake run quickstart",
}
)