|
288 | 288 | "title": "Reveal File",
|
289 | 289 | "category": "rust-analyzer"
|
290 | 290 | },
|
| 291 | + { |
| 292 | + "command": "rust-analyzer.syntaxTreeReveal", |
| 293 | + "title": "Reveal Syntax Element", |
| 294 | + "icon": "$(search)", |
| 295 | + "category": "rust-analyzer (syntax tree)" |
| 296 | + }, |
| 297 | + { |
| 298 | + "command": "rust-analyzer.syntaxTreeHideWhitespace", |
| 299 | + "title": "Hide Whitespace", |
| 300 | + "icon": "$(filter)", |
| 301 | + "category": "rust-analyzer (syntax tree)" |
| 302 | + }, |
| 303 | + { |
| 304 | + "command": "rust-analyzer.syntaxTreeShowWhitespace", |
| 305 | + "title": "Show Whitespace", |
| 306 | + "icon": "$(filter-filled)", |
| 307 | + "category": "rust-analyzer (syntax tree)" |
| 308 | + }, |
291 | 309 | {
|
292 | 310 | "command": "rust-analyzer.viewMemoryLayout",
|
293 | 311 | "title": "View Memory Layout",
|
|
345 | 363 | "default": true,
|
346 | 364 | "type": "boolean"
|
347 | 365 | },
|
| 366 | + "rust-analyzer.showSyntaxTree": { |
| 367 | + "markdownDescription": "Whether to show the syntax tree view.", |
| 368 | + "default": true, |
| 369 | + "type": "boolean" |
| 370 | + }, |
348 | 371 | "rust-analyzer.testExplorer": {
|
349 | 372 | "markdownDescription": "Whether to show the test explorer.",
|
350 | 373 | "default": false,
|
|
3362 | 3385 | },
|
3363 | 3386 | {
|
3364 | 3387 | "command": "rust-analyzer.openWalkthrough"
|
| 3388 | + }, |
| 3389 | + { |
| 3390 | + "command": "rust-analyzer.syntaxTreeReveal", |
| 3391 | + "when": "false" |
| 3392 | + }, |
| 3393 | + { |
| 3394 | + "command": "rust-analyzer.syntaxTreeHideWhitespace", |
| 3395 | + "when": "false" |
| 3396 | + }, |
| 3397 | + { |
| 3398 | + "command": "rust-analyzer.syntaxTreeShowWhitespace", |
| 3399 | + "when": "false" |
3365 | 3400 | }
|
3366 | 3401 | ],
|
3367 | 3402 | "editor/context": [
|
|
3375 | 3410 | "when": "inRustProject && editorTextFocus && editorLangId == rust",
|
3376 | 3411 | "group": "navigation@1001"
|
3377 | 3412 | }
|
| 3413 | + ], |
| 3414 | + "view/title": [ |
| 3415 | + { |
| 3416 | + "command": "rust-analyzer.syntaxTreeHideWhitespace", |
| 3417 | + "group": "navigation", |
| 3418 | + "when": "view == rustSyntaxTree && !rustSyntaxTree.hideWhitespace" |
| 3419 | + }, |
| 3420 | + { |
| 3421 | + "command": "rust-analyzer.syntaxTreeShowWhitespace", |
| 3422 | + "group": "navigation", |
| 3423 | + "when": "view == rustSyntaxTree && rustSyntaxTree.hideWhitespace" |
| 3424 | + } |
| 3425 | + ], |
| 3426 | + "view/item/context": [ |
| 3427 | + { |
| 3428 | + "command": "rust-analyzer.syntaxTreeReveal", |
| 3429 | + "group": "inline", |
| 3430 | + "when": "view == rustSyntaxTree" |
| 3431 | + } |
3378 | 3432 | ]
|
3379 | 3433 | },
|
3380 | 3434 | "views": {
|
|
3384 | 3438 | "name": "Rust Dependencies",
|
3385 | 3439 | "when": "inRustProject && config.rust-analyzer.showDependenciesExplorer"
|
3386 | 3440 | }
|
| 3441 | + ], |
| 3442 | + "rustSyntaxTreeContainer": [ |
| 3443 | + { |
| 3444 | + "id": "rustSyntaxTree", |
| 3445 | + "name": "Rust Syntax Tree", |
| 3446 | + "when": "inRustProject && config.rust-analyzer.showSyntaxTree" |
| 3447 | + } |
| 3448 | + ] |
| 3449 | + }, |
| 3450 | + "viewsContainers": { |
| 3451 | + "activitybar": [ |
| 3452 | + { |
| 3453 | + "id": "rustSyntaxTreeContainer", |
| 3454 | + "title": "Rust Syntax Tree", |
| 3455 | + "icon": "$(list-tree)" |
| 3456 | + } |
3387 | 3457 | ]
|
3388 | 3458 | },
|
3389 | 3459 | "jsonValidation": [
|
|
0 commit comments