Skip to content

Commit 8c3dd7e

Browse files
committed
update config
1 parent 2210740 commit 8c3dd7e

File tree

2 files changed

+84
-51
lines changed

2 files changed

+84
-51
lines changed

package.json

Lines changed: 67 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,70 @@
11
{
2-
"name": "vscode-jupyter-python",
3-
"displayName": "vscode-jupyter-python",
4-
"description": "Python-specific Jupyter VSCode plugin based on https://github.com/nikitakit/hydrogen-python",
5-
"version": "0.0.1",
6-
"publisher": "kylebarron",
7-
"engines": {
8-
"vscode": "^1.15.0"
9-
},
10-
"categories": [
11-
"Other"
2+
"name": "vscode-jupyter-python",
3+
"displayName": "vscode-jupyter-python",
4+
"description": "Python-specific Jupyter VSCode plugin based on https://github.com/nikitakit/hydrogen-python",
5+
"version": "0.0.1",
6+
"publisher": "kylebarron",
7+
"engines": {
8+
"vscode": "^1.15.0"
9+
},
10+
"license": "MIT",
11+
"categories": [
12+
"Other"
13+
],
14+
"activationEvents": [
15+
"onCommand:vscode-jupyter-python.sayHello"
16+
],
17+
"main": "./out/src/extension",
18+
"contributes": {
19+
"commands": [
20+
{
21+
"command": "vscode-jupyter-python.sayHello",
22+
"title": "Hello World"
23+
}
1224
],
13-
"activationEvents": [
14-
"onCommand:extension.sayHello"
15-
],
16-
"main": "./out/src/extension",
17-
"contributes": {
18-
"commands": [{
19-
"command": "extension.sayHello",
20-
"title": "Hello World"
21-
}]
22-
},
23-
"scripts": {
24-
"vscode:prepublish": "npm run compile",
25-
"compile": "tsc -p ./",
26-
"watch": "tsc -watch -p ./",
27-
"postinstall": "node ./node_modules/vscode/bin/install",
28-
"test": "npm run compile && node ./node_modules/vscode/bin/test"
29-
},
30-
"devDependencies": {
31-
"typescript": "^2.5.2",
32-
"vscode": "^1.1.5",
33-
"mocha": "^3.5.0",
34-
"@types/node": "^7.0.43",
35-
"@types/mocha": "^2.2.42"
25+
"configuration": {
26+
"title": "vscode-jupyter-python",
27+
"properties": {
28+
"vscode-jupyter-python.expandCode": {
29+
"type": "boolean",
30+
"default": "true",
31+
"description": "When a line is executed without selection, when this setting is turned off execution only happens on code up that is indented compared to the current line. In python that unfortunately does not always work, because some control structures (e.g. else) continue on the same indentation level. Enabling this setting expands the executed code beyond what hydrogen suggests on the basis of the indentation level. The statements which trigger such extension can be defined below."
32+
},
33+
"vscode-jupyter-python.expandCodeList": {
34+
"title": "Code to Expand",
35+
"type": "array",
36+
"items": {
37+
"type": "string"
38+
},
39+
"default": [
40+
"else",
41+
"elif",
42+
"except",
43+
"finally",
44+
"\\}",
45+
"\\]",
46+
"\\)"
47+
],
48+
"description": "If the above setting is enabled, this list will be passed to a regex. Any of these items in the list need to occur on the same intentation level as the first line. You may define your own custom elements to modify the code to your preferred behaviour. In the default setting, else, elif, except, finally, as well as all closing braces are expanded on."
49+
}
50+
}
3651
}
37-
}
52+
},
53+
"extensionDependencies": [
54+
"ms-toolsai.jupyter"
55+
],
56+
"scripts": {
57+
"vscode:prepublish": "npm run compile",
58+
"compile": "tsc -p ./",
59+
"watch": "tsc -watch -p ./",
60+
"postinstall": "node ./node_modules/vscode/bin/install",
61+
"test": "npm run compile && node ./node_modules/vscode/bin/test"
62+
},
63+
"devDependencies": {
64+
"typescript": "^2.5.2",
65+
"vscode": "^1.1.5",
66+
"mocha": "^3.5.0",
67+
"@types/node": "^7.0.43",
68+
"@types/mocha": "^2.2.42"
69+
}
70+
}

src/extension.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
'use strict';
1+
"use strict";
22
// The module 'vscode' contains the VS Code extensibility API
33
// Import the module and reference it with the alias vscode in your code below
4-
import * as vscode from 'vscode';
4+
import * as vscode from "vscode";
55

66
// this method is called when your extension is activated
77
// your extension is activated the very first time the command is executed
88
export function activate(context: vscode.ExtensionContext) {
9+
// Use the console to output diagnostic information (console.log) and errors (console.error)
10+
// This line of code will only be executed once when your extension is activated
11+
console.log(
12+
'Congratulations, your extension "vscode-jupyter-python" is now active!'
13+
);
914

10-
// Use the console to output diagnostic information (console.log) and errors (console.error)
11-
// This line of code will only be executed once when your extension is activated
12-
console.log('Congratulations, your extension "vscode-jupyter-python" is now active!');
15+
// The command has been defined in the package.json file
16+
// Now provide the implementation of the command with registerCommand
17+
// The commandId parameter must match the command field in package.json
18+
let disposable = vscode.commands.registerCommand("vscode-jupyter-python.sayHello", () => {
19+
// The code you place here will be executed every time your command is executed
1320

14-
// The command has been defined in the package.json file
15-
// Now provide the implementation of the command with registerCommand
16-
// The commandId parameter must match the command field in package.json
17-
let disposable = vscode.commands.registerCommand('extension.sayHello', () => {
18-
// The code you place here will be executed every time your command is executed
21+
// Display a message box to the user
22+
vscode.window.showInformationMessage("Hello World from vscode-jupyter-python!");
23+
});
1924

20-
// Display a message box to the user
21-
vscode.window.showInformationMessage('Hello World!');
22-
});
23-
24-
context.subscriptions.push(disposable);
25+
context.subscriptions.push(disposable);
2526
}
2627

2728
// this method is called when your extension is deactivated
28-
export function deactivate() {
29-
}
29+
export function deactivate() {}

0 commit comments

Comments
 (0)