From 1a29eba3a78fd0264030c933257e8851d87f3fd2 Mon Sep 17 00:00:00 2001 From: Asuka Minato Date: Wed, 4 Dec 2024 10:20:44 +0900 Subject: [PATCH] add back --- package.json | 10 ++++++---- src/extension/extension.ts | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bc38e26..45d1440 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,9 @@ ".wls", ".wlt", ".mt", - ".vsnb" + ".vsnb", + ".ipynb", + ".wlnb" ], "configuration": "./wolfram.language-configuration.json" } @@ -211,19 +213,19 @@ "menus": { "explorer/context": [ { - "when": "resourceExtname == .nb || resourceExtname == .m || resourceExtname == .wl || resourceExtname == .wls || resourceExtname == .cdf", + "when": "resourceExtname == .nb || resourceExtname == .m || resourceExtname == .wl || resourceExtname == .wls || resourceExtname == .cdf || resourceExtname == .ipynb || resourceExtname == .wlnb", "command": "wolfram.OpenNotebook", "group": "navigation" } ], "editor/context": [ { - "when": "resourceExtname == .nb || resourceExtname == .m || resourceExtname == .wl || resourceExtname == .wls || resourceExtname == .cdf", + "when": "resourceExtname == .nb || resourceExtname == .m || resourceExtname == .wl || resourceExtname == .wls || resourceExtname == .cdf || resourceExtname == .ipynb || resourceExtname == .wlnb", "command": "wolfram.OpenNotebook", "group": "navigation" }, { - "when": "resourceExtname == .nb || resourceExtname == .m || resourceExtname == .wl || resourceExtname == .wls || resourceExtname == .cdf", + "when": "resourceExtname == .nb || resourceExtname == .m || resourceExtname == .wl || resourceExtname == .wls || resourceExtname == .cdf || resourceExtname == .ipynb || resourceExtname == .wlnb", "command": "workbench.action.terminal.runSelectedText", "group": "navigation" }, diff --git a/src/extension/extension.ts b/src/extension/extension.ts index d4ff61d..f66091f 100644 --- a/src/extension/extension.ts +++ b/src/extension/extension.ts @@ -205,7 +205,7 @@ export function activate(context: vscode.ExtensionContext) { }; let clientOptions: LanguageClientOptions = { - documentSelector: [{ scheme: 'file', language: 'wolfram' }], + documentSelector: [{ language: 'wolfram' }], initializationOptions: { implicitTokens: implicitTokens, // bracketMatcher: bracketMatcher,