Skip to content

Commit ed1f467

Browse files
committed
add openDocs to context menu. add further restrictions to context menu when clauses to prevent irrelevant commands in non-rust files
1 parent a6603fc commit ed1f467

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

editors/code/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,8 +1869,13 @@
18691869
"editor/context": [
18701870
{
18711871
"command": "rust-analyzer.peekTests",
1872-
"when": "inRustProject",
1872+
"when": "inRustProject && editorTextFocus && editorLangId == rust",
18731873
"group": "navigation@1000"
1874+
},
1875+
{
1876+
"command": "rust-analyzer.openDocs",
1877+
"when": "inRustProject && editorTextFocus && editorLangId == rust",
1878+
"group": "navigation@1001"
18741879
}
18751880
]
18761881
},

0 commit comments

Comments
 (0)