@jupyterlab/lsp-extension 4.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +22 -0
- package/lib/index.js +195 -0
- package/lib/index.js.map +1 -0
- package/lib/renderer.d.ts +6 -0
- package/lib/renderer.js +279 -0
- package/lib/renderer.js.map +1 -0
- package/package.json +70 -0
- package/schema/plugin.json +62 -0
- package/style/index.css +10 -0
- package/style/index.js +10 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module lsp-extension
|
|
4
|
+
*/
|
|
5
|
+
import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application';
|
|
6
|
+
import { ILSPCodeExtractorsManager, ILSPConnection, ILSPDocumentConnectionManager, ILSPFeatureManager } from '@jupyterlab/lsp';
|
|
7
|
+
import { IRunningSessions } from '@jupyterlab/running';
|
|
8
|
+
import { LabIcon } from '@jupyterlab/ui-components';
|
|
9
|
+
export declare class RunningLanguageServers implements IRunningSessions.IRunningItem {
|
|
10
|
+
constructor(connection: ILSPConnection, manager: ILSPDocumentConnectionManager);
|
|
11
|
+
open(): void;
|
|
12
|
+
icon(): LabIcon;
|
|
13
|
+
label(): string;
|
|
14
|
+
shutdown(): void;
|
|
15
|
+
private _connection;
|
|
16
|
+
private _manager;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Export the plugin as default.
|
|
20
|
+
*/
|
|
21
|
+
declare const _default: (JupyterFrontEndPlugin<ILSPDocumentConnectionManager, JupyterFrontEnd.IShell, "desktop" | "mobile"> | JupyterFrontEndPlugin<ILSPFeatureManager, JupyterFrontEnd.IShell, "desktop" | "mobile"> | JupyterFrontEndPlugin<ILSPCodeExtractorsManager, JupyterFrontEnd.IShell, "desktop" | "mobile">)[];
|
|
22
|
+
export default _default;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/* -----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @module lsp-extension
|
|
8
|
+
*/
|
|
9
|
+
import { CodeExtractorsManager, DocumentConnectionManager, FeatureManager, ILSPCodeExtractorsManager, ILSPDocumentConnectionManager, ILSPFeatureManager, LanguageServerManager, TextForeignCodeExtractor } from '@jupyterlab/lsp';
|
|
10
|
+
import { IRunningSessionManagers } from '@jupyterlab/running';
|
|
11
|
+
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
12
|
+
import { ITranslator } from '@jupyterlab/translation';
|
|
13
|
+
import { IFormComponentRegistry, pythonIcon } from '@jupyterlab/ui-components';
|
|
14
|
+
import { Signal } from '@lumino/signaling';
|
|
15
|
+
import { renderServerSetting } from './renderer';
|
|
16
|
+
const plugin = {
|
|
17
|
+
activate,
|
|
18
|
+
id: '@jupyterlab/lsp-extension:plugin',
|
|
19
|
+
requires: [ISettingRegistry, ITranslator],
|
|
20
|
+
optional: [IRunningSessionManagers, IFormComponentRegistry],
|
|
21
|
+
provides: ILSPDocumentConnectionManager,
|
|
22
|
+
autoStart: true
|
|
23
|
+
};
|
|
24
|
+
const featurePlugin = {
|
|
25
|
+
activate: activateFeature,
|
|
26
|
+
id: '@jupyterlab/lsp-extension:feature',
|
|
27
|
+
requires: [ISettingRegistry, ITranslator],
|
|
28
|
+
provides: ILSPFeatureManager,
|
|
29
|
+
autoStart: true
|
|
30
|
+
};
|
|
31
|
+
const codeExtractorManagerPlugin = {
|
|
32
|
+
id: ILSPCodeExtractorsManager.name,
|
|
33
|
+
requires: [],
|
|
34
|
+
activate: app => {
|
|
35
|
+
const extractorManager = new CodeExtractorsManager();
|
|
36
|
+
const markdownCellExtractor = new TextForeignCodeExtractor({
|
|
37
|
+
language: 'markdown',
|
|
38
|
+
isStandalone: false,
|
|
39
|
+
file_extension: 'md',
|
|
40
|
+
cellType: ['markdown']
|
|
41
|
+
});
|
|
42
|
+
extractorManager.register(markdownCellExtractor, null);
|
|
43
|
+
const rawCellExtractor = new TextForeignCodeExtractor({
|
|
44
|
+
language: 'text',
|
|
45
|
+
isStandalone: false,
|
|
46
|
+
file_extension: 'txt',
|
|
47
|
+
cellType: ['raw']
|
|
48
|
+
});
|
|
49
|
+
extractorManager.register(rawCellExtractor, null);
|
|
50
|
+
return extractorManager;
|
|
51
|
+
},
|
|
52
|
+
provides: ILSPCodeExtractorsManager,
|
|
53
|
+
autoStart: true
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Activate the lsp plugin.
|
|
57
|
+
*/
|
|
58
|
+
function activate(app, settingRegistry, translator, runningSessionManagers, settingRendererRegistry) {
|
|
59
|
+
const LANGUAGE_SERVERS = 'language_servers';
|
|
60
|
+
const languageServerManager = new LanguageServerManager({});
|
|
61
|
+
const connectionManager = new DocumentConnectionManager({
|
|
62
|
+
languageServerManager
|
|
63
|
+
});
|
|
64
|
+
const updateOptions = (settings) => {
|
|
65
|
+
const options = settings.composite;
|
|
66
|
+
const languageServerSettings = (options.language_servers ||
|
|
67
|
+
{});
|
|
68
|
+
connectionManager.initialConfigurations = languageServerSettings;
|
|
69
|
+
// TODO: if priorities changed reset connections
|
|
70
|
+
connectionManager.updateConfiguration(languageServerSettings);
|
|
71
|
+
connectionManager.updateServerConfigurations(languageServerSettings);
|
|
72
|
+
connectionManager.updateLogging(options.logAllCommunication, options.setTrace);
|
|
73
|
+
};
|
|
74
|
+
languageServerManager.sessionsChanged.connect(() => {
|
|
75
|
+
settingRegistry.transform(plugin.id, {
|
|
76
|
+
fetch: plugin => {
|
|
77
|
+
const schema = plugin.schema.properties;
|
|
78
|
+
const defaultValue = {};
|
|
79
|
+
languageServerManager.sessions.forEach((_, key) => {
|
|
80
|
+
defaultValue[key] = { priority: 50, serverSettings: {} };
|
|
81
|
+
});
|
|
82
|
+
schema[LANGUAGE_SERVERS]['default'] = defaultValue;
|
|
83
|
+
return plugin;
|
|
84
|
+
},
|
|
85
|
+
compose: plugin => {
|
|
86
|
+
const properties = plugin.schema.properties;
|
|
87
|
+
const user = plugin.data.user;
|
|
88
|
+
const serverDefaultSettings = properties[LANGUAGE_SERVERS]['default'];
|
|
89
|
+
const serverUserSettings = user[LANGUAGE_SERVERS];
|
|
90
|
+
let serverComposite = Object.assign({}, serverDefaultSettings);
|
|
91
|
+
if (serverUserSettings) {
|
|
92
|
+
serverComposite = Object.assign(Object.assign({}, serverComposite), serverUserSettings);
|
|
93
|
+
}
|
|
94
|
+
const composite = {
|
|
95
|
+
[LANGUAGE_SERVERS]: serverComposite
|
|
96
|
+
};
|
|
97
|
+
Object.entries(properties).forEach(([key, value]) => {
|
|
98
|
+
if (key !== LANGUAGE_SERVERS) {
|
|
99
|
+
if (key in user) {
|
|
100
|
+
composite[key] = user[key];
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
composite[key] = value.default;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
plugin.data.composite = composite;
|
|
108
|
+
return plugin;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
settingRegistry
|
|
112
|
+
.load(plugin.id)
|
|
113
|
+
.then(settings => {
|
|
114
|
+
updateOptions(settings);
|
|
115
|
+
settings.changed.connect(() => {
|
|
116
|
+
updateOptions(settings);
|
|
117
|
+
});
|
|
118
|
+
})
|
|
119
|
+
.catch((reason) => {
|
|
120
|
+
console.error(reason.message);
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
// Add a sessions manager if the running extension is available
|
|
124
|
+
if (runningSessionManagers) {
|
|
125
|
+
addRunningSessionManager(runningSessionManagers, connectionManager, translator);
|
|
126
|
+
}
|
|
127
|
+
if (settingRendererRegistry) {
|
|
128
|
+
settingRendererRegistry.addRenderer(LANGUAGE_SERVERS, (props) => {
|
|
129
|
+
return renderServerSetting(props, translator);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return connectionManager;
|
|
133
|
+
}
|
|
134
|
+
function activateFeature(app, settingRegistry, translator) {
|
|
135
|
+
const featureManager = new FeatureManager();
|
|
136
|
+
return featureManager;
|
|
137
|
+
}
|
|
138
|
+
export class RunningLanguageServers {
|
|
139
|
+
constructor(connection, manager) {
|
|
140
|
+
this._connection = connection;
|
|
141
|
+
this._manager = manager;
|
|
142
|
+
}
|
|
143
|
+
open() {
|
|
144
|
+
/** */
|
|
145
|
+
}
|
|
146
|
+
icon() {
|
|
147
|
+
return pythonIcon;
|
|
148
|
+
}
|
|
149
|
+
label() {
|
|
150
|
+
var _a, _b;
|
|
151
|
+
return `${(_a = this._connection.serverIdentifier) !== null && _a !== void 0 ? _a : ''} (${(_b = this._connection.serverLanguage) !== null && _b !== void 0 ? _b : ''})`;
|
|
152
|
+
}
|
|
153
|
+
shutdown() {
|
|
154
|
+
for (const [key, value] of this._manager.connections.entries()) {
|
|
155
|
+
if (value === this._connection) {
|
|
156
|
+
const document = this._manager.documents.get(key);
|
|
157
|
+
this._manager.unregisterDocument(document);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
this._manager.disconnect(this._connection.serverIdentifier);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Add the running terminal manager to the running panel.
|
|
165
|
+
*/
|
|
166
|
+
function addRunningSessionManager(managers, lsManager, translator) {
|
|
167
|
+
const trans = translator.load('jupyterlab');
|
|
168
|
+
const signal = new Signal(lsManager);
|
|
169
|
+
lsManager.connected.connect(() => signal.emit(lsManager));
|
|
170
|
+
lsManager.disconnected.connect(() => signal.emit(lsManager));
|
|
171
|
+
lsManager.closed.connect(() => signal.emit(lsManager));
|
|
172
|
+
lsManager.documentsChanged.connect(() => signal.emit(lsManager));
|
|
173
|
+
managers.add({
|
|
174
|
+
name: trans.__('Language servers'),
|
|
175
|
+
running: () => {
|
|
176
|
+
const connections = new Set([...lsManager.connections.values()]);
|
|
177
|
+
return [...connections].map(conn => new RunningLanguageServers(conn, lsManager));
|
|
178
|
+
},
|
|
179
|
+
shutdownAll: () => {
|
|
180
|
+
/** */
|
|
181
|
+
},
|
|
182
|
+
refreshRunning: () => {
|
|
183
|
+
/** */
|
|
184
|
+
},
|
|
185
|
+
runningChanged: signal,
|
|
186
|
+
shutdownLabel: trans.__('Shut Down'),
|
|
187
|
+
shutdownAllLabel: trans.__('Shut Down All'),
|
|
188
|
+
shutdownAllConfirmationText: trans.__('Are you sure you want to permanently shut down all running language servers?')
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Export the plugin as default.
|
|
193
|
+
*/
|
|
194
|
+
export default [plugin, featurePlugin, codeExtractorManagerPlugin];
|
|
195
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;AAC/E;;;GAGG;AAMH,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EAEzB,6BAA6B,EAC7B,kBAAkB,EAElB,qBAAqB,EACrB,wBAAwB,EAGzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAoB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EACL,sBAAsB,EAEtB,UAAU,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,GAAyD;IACnE,QAAQ;IACR,EAA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AAS,CAAC,CACpD,CAAC;QACJ,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,MAAM;QACR,CAAC;QACD,cAAc,EAAE,GAAG,EAAE;YACnB,MAAM;QACR,CAAC;QACD,cAAc,EAAE,MAAM;QACtB,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC;QACpC,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC;QAC3C,2BAA2B,EAAE,KAAK,CAAC,EAAE,CACnC,8EAA8E,CAC/E;KACF,CAAC,CAAC;AACL,CAAC;AACD;;GAEG;AACH,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,0BAA0B,CAAC,CAAC"}
|
package/lib/renderer.js
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import { UUID } from '@lumino/coreutils';
|
|
14
|
+
import { closeIcon } from '@jupyterlab/ui-components';
|
|
15
|
+
const SETTING_NAME = 'language_servers';
|
|
16
|
+
const SERVER_SETTINGS = 'serverSettings';
|
|
17
|
+
function debounce(func, timeout = 500) {
|
|
18
|
+
let timer;
|
|
19
|
+
return (...args) => {
|
|
20
|
+
clearTimeout(timer);
|
|
21
|
+
timer = setTimeout(() => {
|
|
22
|
+
func(...args);
|
|
23
|
+
}, timeout);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function BuildSettingForm(props) {
|
|
27
|
+
const _a = props.schema, _b = SERVER_SETTINGS, serverSettingsSchema = _a[_b], otherSettingsSchema = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
|
28
|
+
const _c = props.settings, _d = SERVER_SETTINGS, serverSettings = _c[_d], { serverName } = _c, otherSettings = __rest(_c, [typeof _d === "symbol" ? _d : _d + "", "serverName"]);
|
|
29
|
+
const [currentServerName, setCurrentServerName] = useState(serverName);
|
|
30
|
+
const onServerNameChange = (e) => {
|
|
31
|
+
props.updateSetting(props.serverHash, { serverName: e.target.value });
|
|
32
|
+
setCurrentServerName(e.target.value);
|
|
33
|
+
};
|
|
34
|
+
const serverSettingWithType = {};
|
|
35
|
+
Object.entries(serverSettings).forEach(([key, value]) => {
|
|
36
|
+
const newProps = {
|
|
37
|
+
property: key,
|
|
38
|
+
type: typeof value,
|
|
39
|
+
value
|
|
40
|
+
};
|
|
41
|
+
serverSettingWithType[UUID.uuid4()] = newProps;
|
|
42
|
+
});
|
|
43
|
+
const [propertyMap, setPropertyMap] = useState(serverSettingWithType);
|
|
44
|
+
const defaultOtherSettings = {};
|
|
45
|
+
Object.entries(otherSettingsSchema).forEach(([key, value]) => {
|
|
46
|
+
if (key in otherSettings) {
|
|
47
|
+
defaultOtherSettings[key] = otherSettings[key];
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
defaultOtherSettings[key] = value['default'];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const [otherSettingsComposite, setOtherSettingsComposite] = useState(defaultOtherSettings);
|
|
54
|
+
const onOtherSettingsChange = (property, value, type) => {
|
|
55
|
+
let settingValue = value;
|
|
56
|
+
if (type === 'number') {
|
|
57
|
+
settingValue = parseFloat(value);
|
|
58
|
+
}
|
|
59
|
+
const newProps = Object.assign(Object.assign({}, otherSettingsComposite), { [property]: settingValue });
|
|
60
|
+
props.updateSetting(props.serverHash, newProps);
|
|
61
|
+
setOtherSettingsComposite(newProps);
|
|
62
|
+
};
|
|
63
|
+
const addProperty = () => {
|
|
64
|
+
const hash = UUID.uuid4();
|
|
65
|
+
const newMap = Object.assign(Object.assign({}, propertyMap), { [hash]: { property: '', type: 'string', value: '' } });
|
|
66
|
+
const payload = {};
|
|
67
|
+
Object.values(newMap).forEach(value => {
|
|
68
|
+
payload[value.property] = value.value;
|
|
69
|
+
});
|
|
70
|
+
props.updateSetting(props.serverHash, { [SERVER_SETTINGS]: payload });
|
|
71
|
+
setPropertyMap(newMap);
|
|
72
|
+
};
|
|
73
|
+
const removeProperty = (entryHash) => {
|
|
74
|
+
const newMap = {};
|
|
75
|
+
Object.entries(propertyMap).forEach(([hash, value]) => {
|
|
76
|
+
if (hash !== entryHash) {
|
|
77
|
+
newMap[hash] = value;
|
|
78
|
+
}
|
|
79
|
+
const payload = {};
|
|
80
|
+
Object.values(newMap).forEach(value => {
|
|
81
|
+
payload[value.property] = value.value;
|
|
82
|
+
});
|
|
83
|
+
props.updateSetting(props.serverHash, { [SERVER_SETTINGS]: payload });
|
|
84
|
+
setPropertyMap(newMap);
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
const setProperty = (hash, property) => {
|
|
88
|
+
if (hash in propertyMap) {
|
|
89
|
+
const newMap = Object.assign(Object.assign({}, propertyMap), { [hash]: property });
|
|
90
|
+
const payload = {};
|
|
91
|
+
Object.values(newMap).forEach(value => {
|
|
92
|
+
payload[value.property] = value.value;
|
|
93
|
+
});
|
|
94
|
+
setPropertyMap(newMap);
|
|
95
|
+
props.updateSetting(props.serverHash, { [SERVER_SETTINGS]: payload });
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
return (React.createElement("div", { className: "array-item" },
|
|
99
|
+
React.createElement("div", { className: "form-group " },
|
|
100
|
+
React.createElement("div", { className: "jp-FormGroup-content" },
|
|
101
|
+
React.createElement("div", { className: "jp-objectFieldWrapper" },
|
|
102
|
+
React.createElement("fieldset", null,
|
|
103
|
+
React.createElement("div", { className: "form-group small-field" },
|
|
104
|
+
React.createElement("div", { className: "jp-modifiedIndicator jp-errorIndicator" }),
|
|
105
|
+
React.createElement("div", { className: "jp-FormGroup-content" },
|
|
106
|
+
React.createElement("h3", { className: "jp-FormGroup-fieldLabel jp-FormGroup-contentItem" }, "Server name:"),
|
|
107
|
+
React.createElement("div", { className: "jp-inputFieldWrapper jp-FormGroup-contentItem" },
|
|
108
|
+
React.createElement("input", { className: "form-control", type: "text", required: true, value: currentServerName, onChange: e => {
|
|
109
|
+
onServerNameChange(e);
|
|
110
|
+
} })),
|
|
111
|
+
React.createElement("div", { className: "validationErrors" },
|
|
112
|
+
React.createElement("div", null,
|
|
113
|
+
React.createElement("ul", { className: "error-detail bs-callout bs-callout-info" },
|
|
114
|
+
React.createElement("li", { className: "text-danger" }, "is a required property")))))),
|
|
115
|
+
Object.entries(otherSettingsSchema).map(([property, value], idx) => {
|
|
116
|
+
return (React.createElement("div", { key: `${idx}-${property}`, className: "form-group small-field" },
|
|
117
|
+
React.createElement("div", { className: "jp-FormGroup-content" },
|
|
118
|
+
React.createElement("h3", { className: "jp-FormGroup-fieldLabel jp-FormGroup-contentItem" }, value.title),
|
|
119
|
+
React.createElement("div", { className: "jp-inputFieldWrapper jp-FormGroup-contentItem" },
|
|
120
|
+
React.createElement("input", { className: "form-control", placeholder: "", type: value.type, value: otherSettingsComposite[property], onChange: e => onOtherSettingsChange(property, e.target.value, value.type) })),
|
|
121
|
+
React.createElement("div", { className: "jp-FormGroup-description" }, value.description),
|
|
122
|
+
React.createElement("div", { className: "validationErrors" }))));
|
|
123
|
+
}),
|
|
124
|
+
React.createElement("fieldset", null,
|
|
125
|
+
React.createElement("legend", null, serverSettingsSchema['title']),
|
|
126
|
+
Object.entries(propertyMap).map(([hash, property]) => {
|
|
127
|
+
return (React.createElement(PropertyFrom, { key: hash, hash: hash, property: property, removeProperty: removeProperty, setProperty: debounce(setProperty) }));
|
|
128
|
+
}),
|
|
129
|
+
React.createElement("span", null, serverSettingsSchema['description'])))))),
|
|
130
|
+
React.createElement("div", { className: "jp-ArrayOperations" },
|
|
131
|
+
React.createElement("button", { className: "jp-mod-styled jp-mod-reject", onClick: addProperty }, props.trans.__('Add property')),
|
|
132
|
+
React.createElement("button", { className: "jp-mod-styled jp-mod-warn jp-FormGroup-removeButton", onClick: () => props.removeSetting(props.serverHash) }, props.trans.__('Remove server')))));
|
|
133
|
+
}
|
|
134
|
+
function PropertyFrom(props) {
|
|
135
|
+
const [state, setState] = useState(Object.assign({}, props.property));
|
|
136
|
+
const TYPE_MAP = { string: 'text', number: 'number', boolean: 'checkbox' };
|
|
137
|
+
const removeItem = () => {
|
|
138
|
+
props.removeProperty(props.hash);
|
|
139
|
+
};
|
|
140
|
+
const changeName = (newName) => {
|
|
141
|
+
const newState = Object.assign(Object.assign({}, state), { property: newName });
|
|
142
|
+
props.setProperty(props.hash, newState);
|
|
143
|
+
setState(newState);
|
|
144
|
+
};
|
|
145
|
+
const changeValue = (newValue, type) => {
|
|
146
|
+
let value = newValue;
|
|
147
|
+
if (type === 'number') {
|
|
148
|
+
value = parseFloat(newValue);
|
|
149
|
+
}
|
|
150
|
+
const newState = Object.assign(Object.assign({}, state), { value });
|
|
151
|
+
props.setProperty(props.hash, newState);
|
|
152
|
+
setState(newState);
|
|
153
|
+
};
|
|
154
|
+
const changeType = (newType) => {
|
|
155
|
+
let value;
|
|
156
|
+
if (newType === 'boolean') {
|
|
157
|
+
value = false;
|
|
158
|
+
}
|
|
159
|
+
else if (newType === 'number') {
|
|
160
|
+
value = 0;
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
value = '';
|
|
164
|
+
}
|
|
165
|
+
const newState = Object.assign(Object.assign({}, state), { type: newType, value });
|
|
166
|
+
setState(newState);
|
|
167
|
+
props.setProperty(props.hash, newState);
|
|
168
|
+
};
|
|
169
|
+
return (React.createElement("div", { key: props.hash, className: "form-group small-field" },
|
|
170
|
+
React.createElement("div", { className: "jp-FormGroup-content" },
|
|
171
|
+
React.createElement("input", { style: { marginRight: '25px' }, className: "form-control", type: "text", required: true, placeholder: 'Property name', value: state.property, onChange: e => {
|
|
172
|
+
changeName(e.target.value);
|
|
173
|
+
} }),
|
|
174
|
+
React.createElement("select", { style: { marginRight: '25px' }, className: "form-control", value: state.type, onChange: e => changeType(e.target.value) },
|
|
175
|
+
React.createElement("option", { value: "string" }, "String"),
|
|
176
|
+
React.createElement("option", { value: "number" }, "Number"),
|
|
177
|
+
React.createElement("option", { value: "boolean" }, "Boolean")),
|
|
178
|
+
React.createElement("input", { style: { marginRight: '25px' }, className: "form-control", type: TYPE_MAP[state.type], required: false, placeholder: 'Property value', value: state.type !== 'boolean' ? state.value : undefined, checked: state.type === 'boolean' ? state.value : undefined, onChange: state.type !== 'boolean'
|
|
179
|
+
? e => changeValue(e.target.value, state.type)
|
|
180
|
+
: e => changeValue(e.target.checked, state.type) }),
|
|
181
|
+
React.createElement("button", { className: "jp-mod-minimal jp-Button", onClick: removeItem },
|
|
182
|
+
React.createElement(closeIcon.react, null)))));
|
|
183
|
+
}
|
|
184
|
+
class SettingRenderer extends React.Component {
|
|
185
|
+
constructor(props) {
|
|
186
|
+
super(props);
|
|
187
|
+
this.removeSetting = (hash) => {
|
|
188
|
+
if (hash in this.state.items) {
|
|
189
|
+
const items = {};
|
|
190
|
+
for (const key in this.state.items) {
|
|
191
|
+
if (key !== hash) {
|
|
192
|
+
items[key] = this.state.items[key];
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
this.setState(old => {
|
|
196
|
+
return Object.assign(Object.assign({}, old), { items });
|
|
197
|
+
}, () => {
|
|
198
|
+
this.saveServerSetting();
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
this.updateSetting = (hash, newSetting) => {
|
|
203
|
+
if (hash in this.state.items) {
|
|
204
|
+
const items = {};
|
|
205
|
+
for (const key in this.state.items) {
|
|
206
|
+
if (key === hash) {
|
|
207
|
+
items[key] = Object.assign(Object.assign({}, this.state.items[key]), newSetting);
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
items[key] = this.state.items[key];
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
this.setState(old => {
|
|
214
|
+
return Object.assign(Object.assign({}, old), { items });
|
|
215
|
+
}, () => {
|
|
216
|
+
this.saveServerSetting();
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
this.addServerSetting = () => {
|
|
221
|
+
let index = 0;
|
|
222
|
+
let key = 'newKey';
|
|
223
|
+
while (Object.values(this.state.items)
|
|
224
|
+
.map(val => val.serverName)
|
|
225
|
+
.includes(key)) {
|
|
226
|
+
index += 1;
|
|
227
|
+
key = `newKey-${index}`;
|
|
228
|
+
}
|
|
229
|
+
this.setState(old => (Object.assign(Object.assign({}, old), { items: Object.assign(Object.assign({}, old.items), { [UUID.uuid4()]: Object.assign(Object.assign({}, this._defaultSetting), { serverName: key }) }) })), () => {
|
|
230
|
+
this.saveServerSetting();
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
this.saveServerSetting = () => {
|
|
234
|
+
const settings = {};
|
|
235
|
+
Object.values(this.state.items).forEach(item => {
|
|
236
|
+
const { serverName } = item, setting = __rest(item, ["serverName"]);
|
|
237
|
+
settings[serverName] = setting;
|
|
238
|
+
});
|
|
239
|
+
this._setting.set(SETTING_NAME, settings).catch(console.error);
|
|
240
|
+
};
|
|
241
|
+
this._setting = props.formContext.settings;
|
|
242
|
+
this._trans = props.translator.load('jupyterlab');
|
|
243
|
+
const schema = this._setting.schema['definitions'];
|
|
244
|
+
this._defaultSetting = schema['language-server']['default'];
|
|
245
|
+
this._schema = schema['language-server']['properties'];
|
|
246
|
+
const title = props.schema.title;
|
|
247
|
+
const desc = props.schema.description;
|
|
248
|
+
const settings = props.formContext.settings;
|
|
249
|
+
const compositeData = settings.get(SETTING_NAME).composite;
|
|
250
|
+
let items = {};
|
|
251
|
+
if (compositeData) {
|
|
252
|
+
Object.entries(compositeData).forEach(([key, value]) => {
|
|
253
|
+
if (value) {
|
|
254
|
+
const hash = UUID.uuid4();
|
|
255
|
+
items[hash] = Object.assign({ serverName: key }, value);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
this.state = { title, desc, items };
|
|
260
|
+
}
|
|
261
|
+
render() {
|
|
262
|
+
return (React.createElement("div", null,
|
|
263
|
+
React.createElement("fieldset", null,
|
|
264
|
+
React.createElement("legend", null, this.state.title),
|
|
265
|
+
React.createElement("p", { className: "field-description" }, this.state.desc),
|
|
266
|
+
React.createElement("div", { className: "field field-array field-array-of-object" }, Object.entries(this.state.items).map(([hash, value], idx) => {
|
|
267
|
+
return (React.createElement(BuildSettingForm, { key: `${idx}-${hash}`, trans: this._trans, removeSetting: this.removeSetting, updateSetting: debounce(this.updateSetting), serverHash: hash, settings: value, schema: this._schema }));
|
|
268
|
+
})),
|
|
269
|
+
React.createElement("div", null,
|
|
270
|
+
React.createElement("button", { style: { margin: 2 }, className: "jp-mod-styled jp-mod-reject", onClick: this.addServerSetting }, this._trans.__('Add server'))))));
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Custom setting renderer for language server.
|
|
275
|
+
*/
|
|
276
|
+
export function renderServerSetting(props, translator) {
|
|
277
|
+
return React.createElement(SettingRenderer, Object.assign({}, props, { translator: translator }));
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../src/renderer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAmBtD,MAAM,YAAY,GAAG,kBAAkB,CAAC;AACxC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aAAa,CAAC,EAC3C,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,KAAK,EACf,MAAM,EAAE,IAAI,CAAC,OAAO,GACpB,CACH,CAAC;gBACJ,CAAC,CAAC,CACE;gBACN;oBACE,gCACE,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EACpB,SAAS,EAAC,6BAA6B,EACvC,OAAO,EAAE,IAAI,CAAC,gBAAgB,IAE7B,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,CACtB,CACL,CACG,CACP,CACP,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAiB,EACjB,UAAuB;IAEvB,OAAO,oBAAC,eAAe,oBAAK,KAAK,IAAE,UAAU,EAAE,UAAU,IAAI,CAAC;AAChE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jupyterlab/lsp-extension",
|
|
3
|
+
"version": "4.0.0-alpha.11",
|
|
4
|
+
"description": "",
|
|
5
|
+
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/jupyterlab/jupyterlab/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/jupyterlab/jupyterlab.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "BSD-3-Clause",
|
|
14
|
+
"author": "Project Jupyter",
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"style/*.css",
|
|
17
|
+
"style/index.js"
|
|
18
|
+
],
|
|
19
|
+
"main": "lib/index.js",
|
|
20
|
+
"types": "lib/index.d.ts",
|
|
21
|
+
"style": "style/index.css",
|
|
22
|
+
"directories": {
|
|
23
|
+
"lib": "lib/"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
27
|
+
"schema/*.json",
|
|
28
|
+
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
29
|
+
"style/index.js"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc -b",
|
|
33
|
+
"build:all": "npm run build",
|
|
34
|
+
"build:test": "tsc --build tsconfig.test.json",
|
|
35
|
+
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
|
|
36
|
+
"test": "jest",
|
|
37
|
+
"test:cov": "jest --collect-coverage",
|
|
38
|
+
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
|
|
39
|
+
"test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch",
|
|
40
|
+
"watch": "tsc -b --watch"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@jupyterlab/application": "^4.0.0-alpha.11",
|
|
44
|
+
"@jupyterlab/lsp": "^4.0.0-alpha.11",
|
|
45
|
+
"@jupyterlab/running": "^4.0.0-alpha.11",
|
|
46
|
+
"@jupyterlab/settingregistry": "^4.0.0-alpha.11",
|
|
47
|
+
"@jupyterlab/translation": "^4.0.0-alpha.11",
|
|
48
|
+
"@jupyterlab/ui-components": "^4.0.0-alpha.26",
|
|
49
|
+
"@lumino/coreutils": "^1.12.0",
|
|
50
|
+
"@lumino/signaling": "^1.10.1",
|
|
51
|
+
"@rjsf/core": "^3.1.0",
|
|
52
|
+
"react": "^17.0.1"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@jupyterlab/testutils": "^4.0.0-alpha.11",
|
|
56
|
+
"@types/jest": "^26.0.10",
|
|
57
|
+
"jest": "^26.4.2",
|
|
58
|
+
"rimraf": "~3.0.0",
|
|
59
|
+
"ts-jest": "^26.3.0",
|
|
60
|
+
"typescript": "~4.7.3"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
},
|
|
65
|
+
"jupyterlab": {
|
|
66
|
+
"extension": true,
|
|
67
|
+
"schemaDir": "schema"
|
|
68
|
+
},
|
|
69
|
+
"styleModule": "style/index.js"
|
|
70
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"jupyter.lab.setting-icon": "lsp:codeCheck",
|
|
3
|
+
"jupyter.lab.setting-icon-label": "Language integration",
|
|
4
|
+
"jupyter.lab.transform": true,
|
|
5
|
+
"title": "Language Server",
|
|
6
|
+
"description": "Language Server Protocol settings.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"definitions": {
|
|
9
|
+
"language-server": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"default": {
|
|
12
|
+
"serverSettings": {},
|
|
13
|
+
"priority": 50
|
|
14
|
+
},
|
|
15
|
+
"properties": {
|
|
16
|
+
"serverSettings": {
|
|
17
|
+
"title": "Language Server Configurations",
|
|
18
|
+
"description": "Configuration to be sent to language server over LSP when initialized: see the specific language server's documentation for more",
|
|
19
|
+
"type": "object",
|
|
20
|
+
"default": {},
|
|
21
|
+
"patternProperties": {
|
|
22
|
+
".*": {
|
|
23
|
+
"type": ["number", "string", "boolean", "object", "array"]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": true
|
|
27
|
+
},
|
|
28
|
+
"priority": {
|
|
29
|
+
"title": "Priority of the server",
|
|
30
|
+
"description": "When multiple servers match specific document/language, the server with the highest priority will be used",
|
|
31
|
+
"type": "number",
|
|
32
|
+
"default": 50,
|
|
33
|
+
"minimum": 1
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"properties": {
|
|
39
|
+
"language_servers": {
|
|
40
|
+
"title": "Language Server",
|
|
41
|
+
"description": "Language-server specific configuration, keyed by implementation",
|
|
42
|
+
"type": "object",
|
|
43
|
+
"default": {},
|
|
44
|
+
"patternProperties": {
|
|
45
|
+
".*": {
|
|
46
|
+
"$ref": "#/definitions/language-server"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": {
|
|
50
|
+
"$ref": "#/definitions/language-server"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"setTrace": {
|
|
54
|
+
"title": "Ask servers to send trace notifications",
|
|
55
|
+
"type": ["string"],
|
|
56
|
+
"enum": ["off", "messages", "verbose"],
|
|
57
|
+
"default": "off",
|
|
58
|
+
"description": "Whether to ask server to send logs with execution trace (for debugging). To see these messages, set loggingLevel to debug or log. Accepted values are: \"off\", \"messages\", \"verbose\". Servers are allowed to ignore this request."
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"jupyter.lab.shortcuts": []
|
|
62
|
+
}
|
package/style/index.css
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*-----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
|
|
7
|
+
@import url('~@jupyterlab/ui-components/style/index.css');
|
|
8
|
+
@import url('~@jupyterlab/application/style/index.css');
|
|
9
|
+
@import url('~@jupyterlab/lsp/style/index.css');
|
|
10
|
+
@import url('~@jupyterlab/running/style/index.css');
|
package/style/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*-----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
|
|
7
|
+
import '@jupyterlab/ui-components/style/index.js';
|
|
8
|
+
import '@jupyterlab/application/style/index.js';
|
|
9
|
+
import '@jupyterlab/lsp/style/index.js';
|
|
10
|
+
import '@jupyterlab/running/style/index.js';
|