mirror of
https://github.com/microsoft/vscode.git
synced 2026-03-01 14:15:44 +00:00
Issue #7638 **Bug** Open a `.txt` file containing markdown in VSCode. Select the editor language as `markdown` and the highlighing kicks in, but there is no preview button for the file. **Fix** Base display of the markdown preview button on `resourceScheme` instead of `resourceLangId`. Closes #7638
136 lines
3.2 KiB
JSON
136 lines
3.2 KiB
JSON
{
|
|
"name": "vscode-markdown",
|
|
"displayName": "VS Code Markdown",
|
|
"description": "Markdown for VS Code",
|
|
"version": "0.2.0",
|
|
"publisher": "Microsoft",
|
|
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
|
|
"engines": {
|
|
"vscode": "^1.0.0"
|
|
},
|
|
"main": "./out/extension",
|
|
"categories": [
|
|
"Languages"
|
|
],
|
|
"activationEvents": [
|
|
"onCommand:markdown.showPreview",
|
|
"onCommand:markdown.showPreviewToSide",
|
|
"onCommand:markdown.showSource"
|
|
],
|
|
"contributes": {
|
|
"languages": [
|
|
{
|
|
"id": "markdown",
|
|
"aliases": [
|
|
"Markdown",
|
|
"markdown"
|
|
],
|
|
"extensions": [
|
|
".md",
|
|
".mdown",
|
|
".markdown",
|
|
".markdn"
|
|
],
|
|
"configuration": "./language-configuration.json"
|
|
}
|
|
],
|
|
"grammars": [
|
|
{
|
|
"language": "markdown",
|
|
"scopeName": "text.html.markdown",
|
|
"path": "./syntaxes/markdown.tmLanguage"
|
|
}
|
|
],
|
|
"commands": [
|
|
{
|
|
"command": "markdown.showPreview",
|
|
"title": "%markdown.preview.title%",
|
|
"category": "%markdown.category%",
|
|
"icon": {
|
|
"light": "./media/Preview.svg",
|
|
"dark": "./media/Preview_inverse.svg"
|
|
}
|
|
},
|
|
{
|
|
"command": "markdown.showPreviewToSide",
|
|
"title": "%markdown.previewSide.title%",
|
|
"category": "%markdown.category%",
|
|
"icon": {
|
|
"light": "./media/PreviewOnRightPane_16x.svg",
|
|
"dark": "./media/PreviewOnRightPane_16x_dark.svg"
|
|
}
|
|
},
|
|
{
|
|
"command": "markdown.showSource",
|
|
"title": "%markdown.showSource.title%",
|
|
"category": "%markdown.category%",
|
|
"icon": {
|
|
"light": "./media/ViewSource.svg",
|
|
"dark": "./media/ViewSource_inverse.svg"
|
|
}
|
|
}
|
|
],
|
|
"menus": {
|
|
"editor/title": [
|
|
{
|
|
"when": "editorLangId == markdown",
|
|
"command": "markdown.showPreview",
|
|
"alt": "markdown.showPreviewToSide",
|
|
"group": "navigation"
|
|
},
|
|
{
|
|
"when": "resourceScheme == markdown",
|
|
"command": "markdown.showSource",
|
|
"group": "navigation"
|
|
}
|
|
],
|
|
"explorer/context": [
|
|
{
|
|
"when": "editorLangId == markdown",
|
|
"command": "markdown.showPreview",
|
|
"group": "navigation"
|
|
}
|
|
]
|
|
},
|
|
"keybindings": [
|
|
{
|
|
"command": "markdown.showPreview",
|
|
"key": "shift+ctrl+v",
|
|
"mac": "shift+cmd+v",
|
|
"when": "!terminalFocus"
|
|
},
|
|
{
|
|
"command": "markdown.showPreviewToSide",
|
|
"key": "ctrl+k v",
|
|
"mac": "cmd+k v"
|
|
}
|
|
],
|
|
"snippets": [
|
|
{
|
|
"language": "markdown",
|
|
"path": "./snippets/markdown.json"
|
|
}
|
|
],
|
|
"configuration": {
|
|
"type": "object",
|
|
"title": "Markdown",
|
|
"order": 20,
|
|
"properties": {
|
|
"markdown.styles": {
|
|
"type": ["array"],
|
|
"default": [],
|
|
"description": "A list of URLs or local paths to CSS style sheets to use from the markdown preview. Relative paths are interpreted relative to the folder open in the explorer. If there is no open folder, they are interpreted relative to the location of the markdown file. All '\\' need to be written as '\\\\'."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown ./tsconfig.json"
|
|
},
|
|
"dependencies": {
|
|
"highlight.js": "^9.3.0",
|
|
"markdown-it": "^6.0.1",
|
|
"markdown-it-named-headers": "0.0.4",
|
|
"vscode-extension-telemetry": "^0.0.5"
|
|
}
|
|
} |