Markdown: Open Preview - doesn't work for *.prompt.md files (#270417)

This commit is contained in:
Martin Aeschlimann
2025-10-08 22:09:33 +02:00
committed by GitHub
parent 0f5bcca45d
commit cf1a93be3f
3 changed files with 19 additions and 17 deletions

View File

@@ -181,13 +181,13 @@
"command": "markdown.editor.insertLinkFromWorkspace",
"title": "%markdown.editor.insertLinkFromWorkspace%",
"category": "Markdown",
"enablement": "editorLangId == markdown && !activeEditorIsReadonly"
"enablement": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !activeEditorIsReadonly"
},
{
"command": "markdown.editor.insertImageFromWorkspace",
"title": "%markdown.editor.insertImageFromWorkspace%",
"category": "Markdown",
"enablement": "editorLangId == markdown && !activeEditorIsReadonly"
"enablement": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !activeEditorIsReadonly"
}
],
"menus": {
@@ -204,7 +204,7 @@
"editor/title": [
{
"command": "markdown.showPreviewToSide",
"when": "editorLangId == markdown && !notebookEditorFocused && !hasCustomMarkdownPreview",
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !notebookEditorFocused && !hasCustomMarkdownPreview",
"alt": "markdown.showPreview",
"group": "navigation"
},
@@ -232,24 +232,24 @@
"explorer/context": [
{
"command": "markdown.showPreview",
"when": "resourceLangId == markdown && !hasCustomMarkdownPreview",
"when": "resourceLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !hasCustomMarkdownPreview",
"group": "navigation"
},
{
"command": "markdown.findAllFileReferences",
"when": "resourceLangId == markdown",
"when": "resourceLangId =~ /^(markdown|prompt|instructions|chatmode)$/",
"group": "4_search"
}
],
"editor/title/context": [
{
"command": "markdown.showPreview",
"when": "resourceLangId == markdown && !hasCustomMarkdownPreview",
"when": "resourceLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !hasCustomMarkdownPreview",
"group": "1_open"
},
{
"command": "markdown.findAllFileReferences",
"when": "resourceLangId == markdown"
"when": "resourceLangId =~ /^(markdown|prompt|instructions|chatmode)$/"
}
],
"commandPalette": [
@@ -263,17 +263,17 @@
},
{
"command": "markdown.showPreview",
"when": "editorLangId == markdown && !notebookEditorFocused",
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !notebookEditorFocused",
"group": "navigation"
},
{
"command": "markdown.showPreviewToSide",
"when": "editorLangId == markdown && !notebookEditorFocused",
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !notebookEditorFocused",
"group": "navigation"
},
{
"command": "markdown.showLockedPreviewToSide",
"when": "editorLangId == markdown && !notebookEditorFocused",
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !notebookEditorFocused",
"group": "navigation"
},
{
@@ -283,7 +283,7 @@
},
{
"command": "markdown.showPreviewSecuritySelector",
"when": "editorLangId == markdown && !notebookEditorFocused"
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !notebookEditorFocused"
},
{
"command": "markdown.showPreviewSecuritySelector",
@@ -295,7 +295,7 @@
},
{
"command": "markdown.preview.refresh",
"when": "editorLangId == markdown && !notebookEditorFocused"
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !notebookEditorFocused"
},
{
"command": "markdown.preview.refresh",
@@ -303,7 +303,7 @@
},
{
"command": "markdown.findAllFileReferences",
"when": "editorLangId == markdown"
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/"
}
]
},
@@ -312,13 +312,13 @@
"command": "markdown.showPreview",
"key": "shift+ctrl+v",
"mac": "shift+cmd+v",
"when": "editorLangId == markdown && !notebookEditorFocused"
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !notebookEditorFocused"
},
{
"command": "markdown.showPreviewToSide",
"key": "ctrl+k v",
"mac": "cmd+k v",
"when": "editorLangId == markdown && !notebookEditorFocused"
"when": "editorLangId =~ /^(markdown|prompt|instructions|chatmode)$/ && !notebookEditorFocused"
}
],
"configuration": {