Skip to content

Commit b6e2412

Browse files
authored
Declare support for markdown files (#950)
Changes necessary to support markdown formatting in ruff's LSP in vscode: astral-sh/ruff#23063
1 parent 077ef4f commit b6e2412

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@
5656
},
5757
"activationEvents": [
5858
"onLanguage:python",
59+
"onLanguage:markdown",
5960
"workspaceContains:*.py",
60-
"workspaceContains:*.ipynb"
61+
"workspaceContains:*.ipynb",
62+
"workspaceContains:*.md"
6163
],
6264
"main": "./dist/extension.js",
6365
"scripts": {

src/common/utilities.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ export async function getProjectRoot(): Promise<WorkspaceFolder> {
3737

3838
export function getDocumentSelector(): DocumentSelector {
3939
return isVirtualWorkspace()
40-
? [{ language: "python" }]
40+
? [{ language: "python" }, { language: "markdown" }]
4141
: [
4242
{ scheme: "file", language: "python" },
4343
{ scheme: "untitled", language: "python" },
4444
{ scheme: "vscode-notebook", language: "python" },
4545
{ scheme: "vscode-notebook-cell", language: "python" },
46+
{ scheme: "file", language: "markdown" },
47+
{ scheme: "untitled", language: "markdown" },
4648
];
4749
}

0 commit comments

Comments
 (0)