Skip to content

Commit d04848d

Browse files
enable switchheadersource for all c-based langs, and add category to all commands (#254)
* enable switch source/header context menu for c-based langs * add categories to all commands
1 parent 8001750 commit d04848d

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

package.json

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,73 +161,88 @@
161161
"commands": [
162162
{
163163
"command": "clangd.switchheadersource",
164-
"title": "clangd: Switch between source/header"
164+
"category": "clangd",
165+
"title": "Switch Between Source/Header"
165166
},
166167
{
167168
"command": "clangd.install",
168-
"title": "clangd: Download language server"
169+
"category": "clangd",
170+
"title": "Download language server"
169171
},
170172
{
171173
"command": "clangd.update",
172-
"title": "clangd: Check for language server update"
174+
"category": "clangd",
175+
"title": "Check for language server update"
173176
},
174177
{
175178
"command": "clangd.activate",
176-
"title": "clangd: Manually activate extension"
179+
"category": "clangd",
180+
"title": "Manually activate extension"
177181
},
178182
{
179183
"command": "clangd.restart",
180-
"title": "clangd: Restart language server"
184+
"category": "clangd",
185+
"title": "Restart language server"
181186
},
182187
{
183188
"command": "clangd.typeHierarchy",
189+
"category": "clangd",
184190
"title": "Open Type Hierarchy"
185191
},
186192
{
187193
"command": "clangd.typeHierarchy.viewParents",
194+
"category": "clangd",
188195
"title": "Types: Show Base Classes",
189196
"icon": "$(triangle-up)"
190197
},
191198
{
192199
"command": "clangd.typeHierarchy.viewChildren",
200+
"category": "clangd",
193201
"title": "Types: Show Derived Classes",
194202
"icon": "$(triangle-down)"
195203
},
196204
{
197205
"command": "clangd.typeHierarchy.close",
206+
"category": "clangd",
198207
"title": "Close",
199208
"icon": "$(panel-close)"
200209
},
201210
{
202211
"command": "clangd.memoryUsage",
203-
"title": "clangd: Show memory usage",
212+
"category": "clangd",
213+
"title": "Show memory usage",
204214
"enablement": "clangd.memoryUsage.supported",
205215
"icon": "$(refresh)"
206216
},
207217
{
208218
"command": "clangd.memoryUsage.close",
219+
"category": "clangd",
209220
"title": "Close",
210221
"icon": "$(panel-close)"
211222
},
212223
{
213224
"command": "clangd.ast",
225+
"category": "clangd",
214226
"title": "Show AST",
215227
"enablement": "clangd.ast.supported",
216228
"icon": "$(list-tree)"
217229
},
218230
{
219231
"command": "clangd.ast.close",
232+
"category": "clangd",
220233
"title": "Close",
221234
"icon": "$(panel-close)"
222235
},
223236
{
224237
"command": "clangd.projectConfig",
225-
"title": "clangd: Open project configuration file",
238+
"category": "clangd",
239+
"title": "Open project configuration file",
226240
"icon": "$(gear)"
227241
},
228242
{
229243
"command": "clangd.userConfig",
230-
"title": "clangd: Open user configuration file",
244+
"category": "clangd",
245+
"title": "Open user configuration file",
231246
"icon": "$(gear)"
232247
}
233248
],
@@ -254,7 +269,7 @@
254269
},
255270
{
256271
"command": "clangd.switchheadersource",
257-
"when": "resourceLangId == cpp",
272+
"when": "resourceLangId == c || resourceLangId == cpp || resourceLangId == cuda || resourceLangId == objective-c || resourceLangId == objective-cpp",
258273
"group": "0_navigation@5"
259274
},
260275
{

0 commit comments

Comments
 (0)