Skip to content

Commit e009450

Browse files
committed
update
1 parent 08e6126 commit e009450

File tree

5 files changed

+59
-59
lines changed

5 files changed

+59
-59
lines changed

package-lock.json

Lines changed: 32 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyterlab_vim",
3-
"version": "0.9.0",
3+
"version": "0.9.1-dev",
44
"description": "Code cell vim bindings",
55
"author": "Jacques Kvam",
66
"main": "lib/index.js",
@@ -28,16 +28,19 @@
2828
},
2929
"files": [
3030
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
31-
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
31+
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
32+
"schema/*.json"
3233
],
3334
"jupyterlab": {
34-
"extension": true
35+
"extension": true,
36+
"schemaDir": "schema"
3537
},
3638
"dependencies": {
3739
"@jupyterlab/application": "^0.18.0",
3840
"@jupyterlab/codemirror": "^0.18.0",
3941
"@jupyterlab/cells": "^0.18.0",
4042
"@jupyterlab/notebook": "^0.18.0",
43+
"@jupyterlab/coreutils": "^2.1.0",
4144
"@phosphor/commands": "^1.4.0",
4245
"@phosphor/coreutils": "^1.3.0",
4346
"@phosphor/domutils": "^1.1.2",

schema/plugin.json

Lines changed: 0 additions & 53 deletions
This file was deleted.

schema/vim.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"jupyter.lab.setting-icon-class": "jp-NotebookIcon",
3+
"jupyter.lab.setting-icon-label": "Notebook",
4+
"title": "Vim Notebook Cell",
5+
"description": "Vim Notebook Cell Settings",
6+
"properties": {
7+
"enable": {
8+
"type": "boolean",
9+
"title": "Enable",
10+
"default": true
11+
}
12+
},
13+
"type": "object"
14+
}

src/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const IS_MAC = !!navigator.platform.match(/Mac/i);
3939
* Initialization data for the jupyterlab_vim extension.
4040
*/
4141
const extension: JupyterLabPlugin<void> = {
42-
id: 'jupyterlab_vim',
42+
id: 'jupyterlab_vim:vim',
4343
autoStart: true,
4444
activate: activateCellVim,
4545
requires: [INotebookTracker, ISettingRegistry]
@@ -190,10 +190,15 @@ class VimCell {
190190
}
191191

192192
function activateCellVim(app: JupyterLab, tracker: INotebookTracker, settingRegistry: ISettingRegistry): Promise<void> {
193-
const id = plugin.id;
193+
const id = extension.id;
194194
const { commands, shell } = app;
195195

196196
Promise.all([settingRegistry.load(id), app.restored]).then(([settings, args]) => {
197+
// Promise.all([app.restored]).then(([args]) => {
198+
const enabled = settings.get('enable').composite as boolean;
199+
if (enabled === false) {
200+
return;
201+
}
197202
function getCurrent(args: ReadonlyJSONObject): NotebookPanel | null {
198203
const widget = tracker.currentWidget;
199204
const activate = args['activate'] !== false;

0 commit comments

Comments
 (0)