Skip to content

Commit f78f7ee

Browse files
committed
Disable the Razor commands that don't work
1 parent 6a0de19 commit f78f7ee

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,12 +1881,14 @@
18811881
{
18821882
"command": "extension.showRazorCSharpWindow",
18831883
"title": "%command.extension.showRazorCSharpWindow%",
1884-
"category": "Razor"
1884+
"category": "Razor",
1885+
"enablement": "razor.mode == 'lsp'"
18851886
},
18861887
{
18871888
"command": "extension.showRazorHtmlWindow",
18881889
"title": "%command.extension.showRazorHtmlWindow%",
1889-
"category": "Razor"
1890+
"category": "Razor",
1891+
"enablement": "razor.mode == 'lsp'"
18901892
},
18911893
{
18921894
"command": "razor.reportIssue",

src/lsptoolshost/razor/razorEndpoints.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ export function registerRazorEndpoints(
6363
);
6464

6565
if (razorOptions.cohostingEnabled) {
66+
vscode.commands.executeCommand('setContext', 'razor.mode', 'cohosting');
6667
registerCohostingEndpoints();
6768
} else {
69+
vscode.commands.executeCommand('setContext', 'razor.mode', 'lsp');
6870
registerNonCohostingEndpoints();
6971
}
7072

0 commit comments

Comments
 (0)