@jupyterlab/lsp 4.0.0-alpha.11 → 4.0.0-alpha.12
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/adapters/adapter.d.ts +184 -54
- package/lib/adapters/adapter.js +177 -132
- package/lib/adapters/adapter.js.map +1 -1
- package/lib/adapters/statusmessage.d.ts +47 -0
- package/lib/adapters/statusmessage.js +74 -0
- package/lib/adapters/statusmessage.js.map +1 -0
- package/lib/connection.d.ts +113 -26
- package/lib/connection.js +166 -105
- package/lib/connection.js.map +1 -1
- package/lib/connection_manager.d.ts +143 -18
- package/lib/connection_manager.js +163 -49
- package/lib/connection_manager.js.map +1 -1
- package/lib/extractors/index.d.ts +3 -0
- package/lib/extractors/index.js +6 -0
- package/lib/extractors/index.js.map +1 -0
- package/lib/extractors/manager.d.ts +21 -4
- package/lib/extractors/manager.js +22 -5
- package/lib/extractors/manager.js.map +1 -1
- package/lib/extractors/text_extractor.d.ts +34 -7
- package/lib/extractors/text_extractor.js +11 -0
- package/lib/extractors/text_extractor.js.map +1 -1
- package/lib/extractors/types.d.ts +8 -6
- package/lib/extractors/types.js +2 -0
- package/lib/extractors/types.js.map +1 -1
- package/lib/feature.d.ts +18 -3
- package/lib/feature.js +20 -3
- package/lib/feature.js.map +1 -1
- package/lib/index.d.ts +6 -9
- package/lib/index.js +8 -13
- package/lib/index.js.map +1 -1
- package/lib/lsp.d.ts +10 -4
- package/lib/lsp.js +2 -0
- package/lib/lsp.js.map +1 -1
- package/lib/manager.d.ts +103 -16
- package/lib/manager.js +118 -31
- package/lib/manager.js.map +1 -1
- package/lib/plugin.d.ts +18 -13
- package/lib/plugin.js +2 -1
- package/lib/plugin.js.map +1 -1
- package/lib/positioning.d.ts +43 -6
- package/lib/positioning.js +28 -2
- package/lib/positioning.js.map +1 -1
- package/lib/schema.js +2 -1
- package/lib/schema.js.map +1 -1
- package/lib/tokens.d.ts +275 -45
- package/lib/tokens.js +28 -0
- package/lib/tokens.js.map +1 -1
- package/lib/utils.d.ts +15 -1
- package/lib/utils.js +18 -2
- package/lib/utils.js.map +1 -1
- package/lib/virtual/document.d.ts +374 -78
- package/lib/virtual/document.js +375 -148
- package/lib/virtual/document.js.map +1 -1
- package/lib/ws-connection/server-capability-registration.d.ts +18 -0
- package/lib/ws-connection/server-capability-registration.js +46 -0
- package/lib/ws-connection/server-capability-registration.js.map +1 -0
- package/lib/ws-connection/types.d.ts +75 -0
- package/lib/ws-connection/types.js +7 -0
- package/lib/ws-connection/types.js.map +1 -0
- package/lib/ws-connection/ws-connection.d.ts +82 -0
- package/lib/ws-connection/ws-connection.js +201 -0
- package/lib/ws-connection/ws-connection.js.map +1 -0
- package/package.json +15 -16
- package/style/index.css +0 -2
- package/style/index.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IDocumentWidget } from '@jupyterlab/docregistry';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ISignal } from '@lumino/signaling';
|
|
3
|
+
import { WidgetLSPAdapter } from './adapters/adapter';
|
|
4
4
|
import { LSPConnection } from './connection';
|
|
5
5
|
import { AskServersToSendTraceNotifications } from './plugin';
|
|
6
6
|
import { IDocumentConnectionData, ILanguageServerManager, ILSPConnection, ILSPDocumentConnectionManager, ISocketConnectionOptions, TLanguageServerConfigurations, TLanguageServerId } from './tokens';
|
|
@@ -11,34 +11,100 @@ import { IForeignContext, VirtualDocument } from './virtual/document';
|
|
|
11
11
|
* as two identical id_paths could be created for two different notebooks.
|
|
12
12
|
*/
|
|
13
13
|
export declare class DocumentConnectionManager implements ILSPDocumentConnectionManager {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
constructor(options: DocumentConnectionManager.IOptions);
|
|
15
|
+
/**
|
|
16
|
+
* Map between the URI of the virtual document and its connection
|
|
17
|
+
* to the language server
|
|
18
|
+
*/
|
|
19
|
+
readonly connections: Map<VirtualDocument.uri, LSPConnection>;
|
|
20
|
+
/**
|
|
21
|
+
* Map between the path of the document and its adapter
|
|
22
|
+
*/
|
|
23
|
+
readonly adapters: Map<string, WidgetLSPAdapter<IDocumentWidget>>;
|
|
24
|
+
/**
|
|
25
|
+
* Map between the URI of the virtual document and the document itself.
|
|
26
|
+
*/
|
|
27
|
+
readonly documents: Map<VirtualDocument.uri, VirtualDocument>;
|
|
28
|
+
/**
|
|
29
|
+
* The language server manager plugin.
|
|
30
|
+
*/
|
|
31
|
+
readonly languageServerManager: ILanguageServerManager;
|
|
32
|
+
/**
|
|
33
|
+
* Initial configuration for the language servers.
|
|
34
|
+
*/
|
|
35
|
+
initialConfigurations: TLanguageServerConfigurations;
|
|
36
|
+
/**
|
|
37
|
+
* Signal emitted when the manager is initialized.
|
|
38
|
+
*/
|
|
39
|
+
get initialized(): ISignal<ILSPDocumentConnectionManager, IDocumentConnectionData>;
|
|
40
|
+
/**
|
|
41
|
+
* Signal emitted when the manager is connected to the server
|
|
42
|
+
*/
|
|
43
|
+
get connected(): ISignal<ILSPDocumentConnectionManager, IDocumentConnectionData>;
|
|
19
44
|
/**
|
|
20
45
|
* Connection temporarily lost or could not be fully established; a re-connection will be attempted;
|
|
21
46
|
*/
|
|
22
|
-
disconnected:
|
|
47
|
+
get disconnected(): ISignal<ILSPDocumentConnectionManager, IDocumentConnectionData>;
|
|
23
48
|
/**
|
|
24
49
|
* Connection was closed permanently and no-reconnection will be attempted, e.g.:
|
|
25
50
|
* - there was a serious server error
|
|
26
51
|
* - user closed the connection,
|
|
27
52
|
* - re-connection attempts exceeded,
|
|
28
53
|
*/
|
|
29
|
-
closed:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
54
|
+
get closed(): ISignal<ILSPDocumentConnectionManager, IDocumentConnectionData>;
|
|
55
|
+
/**
|
|
56
|
+
* Signal emitted when the document is changed.
|
|
57
|
+
*/
|
|
58
|
+
get documentsChanged(): ISignal<ILSPDocumentConnectionManager, Map<VirtualDocument.uri, VirtualDocument>>;
|
|
59
|
+
/**
|
|
60
|
+
* Promise resolved when the language server manager is ready.
|
|
61
|
+
*/
|
|
62
|
+
get ready(): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Helper to connect various virtual document signal with callbacks of
|
|
65
|
+
* this class.
|
|
66
|
+
*
|
|
67
|
+
* @param virtualDocument - virtual document to be connected.
|
|
68
|
+
*/
|
|
35
69
|
connectDocumentSignals(virtualDocument: VirtualDocument): void;
|
|
70
|
+
/**
|
|
71
|
+
* Helper to disconnect various virtual document signal with callbacks of
|
|
72
|
+
* this class.
|
|
73
|
+
*
|
|
74
|
+
* @param virtualDocument - virtual document to be disconnected.
|
|
75
|
+
*/
|
|
36
76
|
disconnectDocumentSignals(virtualDocument: VirtualDocument, emit?: boolean): void;
|
|
77
|
+
/**
|
|
78
|
+
* Handle foreign document opened event.
|
|
79
|
+
*/
|
|
37
80
|
onForeignDocumentOpened(_host: VirtualDocument, context: IForeignContext): void;
|
|
81
|
+
/**
|
|
82
|
+
* Handle foreign document closed event.
|
|
83
|
+
*/
|
|
38
84
|
onForeignDocumentClosed(_host: VirtualDocument, context: IForeignContext): void;
|
|
39
|
-
|
|
40
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Register a widget adapter with this manager
|
|
87
|
+
*
|
|
88
|
+
* @param path - path to the inner document of the adapter
|
|
89
|
+
* @param adapter - the adapter to be registered
|
|
90
|
+
*/
|
|
91
|
+
registerAdapter(path: string, adapter: WidgetLSPAdapter<IDocumentWidget>): void;
|
|
92
|
+
/**
|
|
93
|
+
* Handles the settings that do not require an existing connection
|
|
94
|
+
* with a language server (or can influence to which server the
|
|
95
|
+
* connection will be created, e.g. `rank`).
|
|
96
|
+
*
|
|
97
|
+
* This function should be called **before** initialization of servers.
|
|
98
|
+
*/
|
|
41
99
|
updateConfiguration(allServerSettings: TLanguageServerConfigurations): void;
|
|
100
|
+
/**
|
|
101
|
+
* Handles the settings that the language servers accept using
|
|
102
|
+
* `onDidChangeConfiguration` messages, which should be passed under
|
|
103
|
+
* the "serverSettings" keyword in the setting registry.
|
|
104
|
+
* Other configuration options are handled by `updateConfiguration` instead.
|
|
105
|
+
*
|
|
106
|
+
* This function should be called **after** initialization of servers.
|
|
107
|
+
*/
|
|
42
108
|
updateServerConfigurations(allServerSettings: TLanguageServerConfigurations): void;
|
|
43
109
|
/**
|
|
44
110
|
* Fired the first time a connection is opened. These _should_ be the only
|
|
@@ -47,25 +113,84 @@ export declare class DocumentConnectionManager implements ILSPDocumentConnection
|
|
|
47
113
|
*/
|
|
48
114
|
onNewConnection: (connection: LSPConnection) => void;
|
|
49
115
|
/**
|
|
116
|
+
* Retry to connect to the server each `reconnectDelay` seconds
|
|
117
|
+
* and for `retrialsLeft` times.
|
|
50
118
|
* TODO: presently no longer referenced. A failing connection would close
|
|
51
119
|
* the socket, triggering the language server on the other end to exit
|
|
52
120
|
*/
|
|
53
121
|
retryToConnect(options: ISocketConnectionOptions, reconnectDelay: number, retrialsLeft?: number): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Disconnect the connection to the language server of the requested
|
|
124
|
+
* language.
|
|
125
|
+
*/
|
|
54
126
|
disconnect(languageId: TLanguageServerId): void;
|
|
127
|
+
/**
|
|
128
|
+
* Create a new connection to the language server
|
|
129
|
+
* @return A promise of the LSP connection
|
|
130
|
+
*/
|
|
55
131
|
connect(options: ISocketConnectionOptions, firstTimeoutSeconds?: number, secondTimeoutMinutes?: number): Promise<ILSPConnection | undefined>;
|
|
132
|
+
/**
|
|
133
|
+
* Disconnect the signals of requested virtual document.
|
|
134
|
+
*/
|
|
56
135
|
unregisterDocument(virtualDocument: VirtualDocument, emit?: boolean): void;
|
|
136
|
+
/**
|
|
137
|
+
* Enable or disable the logging feature of the language servers
|
|
138
|
+
*/
|
|
57
139
|
updateLogging(logAllCommunication: boolean, setTrace: AskServersToSendTraceNotifications): void;
|
|
58
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Create the LSP connection for requested virtual document.
|
|
142
|
+
*
|
|
143
|
+
* @return Return the promise of the LSP connection.
|
|
144
|
+
*/
|
|
145
|
+
private _connectSocket;
|
|
146
|
+
/**
|
|
147
|
+
* Helper to apply callback on all documents of a connection.
|
|
148
|
+
*/
|
|
149
|
+
private _forEachDocumentOfConnection;
|
|
150
|
+
private _initialized;
|
|
151
|
+
private _connected;
|
|
152
|
+
private _disconnected;
|
|
153
|
+
private _closed;
|
|
154
|
+
private _documentsChanged;
|
|
155
|
+
/**
|
|
156
|
+
* Set of ignored languages
|
|
157
|
+
*/
|
|
158
|
+
private _ignoredLanguages;
|
|
59
159
|
}
|
|
60
160
|
export declare namespace DocumentConnectionManager {
|
|
61
161
|
interface IOptions {
|
|
162
|
+
/**
|
|
163
|
+
* The language server manager instance.
|
|
164
|
+
*/
|
|
62
165
|
languageServerManager: ILanguageServerManager;
|
|
63
166
|
}
|
|
64
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Generate the URI of a virtual document from input
|
|
169
|
+
*
|
|
170
|
+
* @param virtualDocument - the virtual document
|
|
171
|
+
* @param language - language of the document
|
|
172
|
+
*/
|
|
173
|
+
function solveUris(virtualDocument: VirtualDocument, language: string): IURIs | undefined;
|
|
65
174
|
interface IURIs {
|
|
175
|
+
/**
|
|
176
|
+
* The root URI set by server.
|
|
177
|
+
*
|
|
178
|
+
*/
|
|
66
179
|
base: string;
|
|
180
|
+
/**
|
|
181
|
+
* The URI to the virtual document.
|
|
182
|
+
*
|
|
183
|
+
*/
|
|
67
184
|
document: string;
|
|
185
|
+
/**
|
|
186
|
+
* Address of websocket endpoint for LSP services.
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
68
189
|
server: string;
|
|
190
|
+
/**
|
|
191
|
+
* Address of websocket endpoint for the language server.
|
|
192
|
+
*
|
|
193
|
+
*/
|
|
69
194
|
socket: string;
|
|
70
195
|
}
|
|
71
196
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
1
3
|
import { PageConfig, URLExt } from '@jupyterlab/coreutils';
|
|
2
4
|
import { Signal } from '@lumino/signaling';
|
|
3
5
|
import { LSPConnection } from './connection';
|
|
@@ -15,17 +17,17 @@ export class DocumentConnectionManager {
|
|
|
15
17
|
* singletons).
|
|
16
18
|
*/
|
|
17
19
|
this.onNewConnection = (connection) => {
|
|
18
|
-
connection.
|
|
20
|
+
connection.errorSignal.connect((_, e) => {
|
|
19
21
|
console.error(e);
|
|
20
22
|
// TODO invalid now
|
|
21
23
|
let error = e.length && e.length >= 1 ? e[0] : new Error();
|
|
22
24
|
// TODO: those codes may be specific to my proxy client, need to investigate
|
|
23
25
|
if (error.message.indexOf('code = 1005') !== -1) {
|
|
24
26
|
console.error(`Connection failed for ${connection}`);
|
|
25
|
-
this.
|
|
27
|
+
this._forEachDocumentOfConnection(connection, virtualDocument => {
|
|
26
28
|
console.error('disconnecting ' + virtualDocument.uri);
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
+
this._closed.emit({ connection, virtualDocument });
|
|
30
|
+
this._ignoredLanguages.add(virtualDocument.language);
|
|
29
31
|
console.error(`Cancelling further attempts to connect ${virtualDocument.uri} and other documents for this language (no support from the server)`);
|
|
30
32
|
});
|
|
31
33
|
}
|
|
@@ -36,44 +38,95 @@ export class DocumentConnectionManager {
|
|
|
36
38
|
console.error('Connection error:', e);
|
|
37
39
|
}
|
|
38
40
|
});
|
|
39
|
-
connection.
|
|
41
|
+
connection.serverInitialized.connect(() => {
|
|
40
42
|
// Initialize using settings stored in the SettingRegistry
|
|
41
|
-
this.
|
|
43
|
+
this._forEachDocumentOfConnection(connection, virtualDocument => {
|
|
42
44
|
// TODO: is this still necessary, e.g. for status bar to update responsively?
|
|
43
|
-
this.
|
|
45
|
+
this._initialized.emit({ connection, virtualDocument });
|
|
44
46
|
});
|
|
45
47
|
this.updateServerConfigurations(this.initialConfigurations);
|
|
46
48
|
});
|
|
47
|
-
connection.
|
|
49
|
+
connection.closeSignal.connect((_, closedManually) => {
|
|
48
50
|
if (!closedManually) {
|
|
49
51
|
console.error('Connection unexpectedly disconnected');
|
|
50
52
|
}
|
|
51
53
|
else {
|
|
52
54
|
console.log('Connection closed');
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
55
|
+
this._forEachDocumentOfConnection(connection, virtualDocument => {
|
|
56
|
+
this._closed.emit({ connection, virtualDocument });
|
|
55
57
|
});
|
|
56
58
|
}
|
|
57
59
|
});
|
|
58
60
|
};
|
|
61
|
+
this._initialized = new Signal(this);
|
|
62
|
+
this._connected = new Signal(this);
|
|
63
|
+
this._disconnected = new Signal(this);
|
|
64
|
+
this._closed = new Signal(this);
|
|
65
|
+
this._documentsChanged = new Signal(this);
|
|
59
66
|
this.connections = new Map();
|
|
60
67
|
this.documents = new Map();
|
|
61
68
|
this.adapters = new Map();
|
|
62
|
-
this.
|
|
63
|
-
this.connected = new Signal(this);
|
|
64
|
-
this.initialized = new Signal(this);
|
|
65
|
-
this.disconnected = new Signal(this);
|
|
66
|
-
this.closed = new Signal(this);
|
|
67
|
-
this.documentsChanged = new Signal(this);
|
|
69
|
+
this._ignoredLanguages = new Set();
|
|
68
70
|
this.languageServerManager = options.languageServerManager;
|
|
69
71
|
Private.setLanguageServerManager(options.languageServerManager);
|
|
70
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Signal emitted when the manager is initialized.
|
|
75
|
+
*/
|
|
76
|
+
get initialized() {
|
|
77
|
+
return this._initialized;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Signal emitted when the manager is connected to the server
|
|
81
|
+
*/
|
|
82
|
+
get connected() {
|
|
83
|
+
return this._connected;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Connection temporarily lost or could not be fully established; a re-connection will be attempted;
|
|
87
|
+
*/
|
|
88
|
+
get disconnected() {
|
|
89
|
+
return this._disconnected;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Connection was closed permanently and no-reconnection will be attempted, e.g.:
|
|
93
|
+
* - there was a serious server error
|
|
94
|
+
* - user closed the connection,
|
|
95
|
+
* - re-connection attempts exceeded,
|
|
96
|
+
*/
|
|
97
|
+
get closed() {
|
|
98
|
+
return this._closed;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Signal emitted when the document is changed.
|
|
102
|
+
*/
|
|
103
|
+
get documentsChanged() {
|
|
104
|
+
return this._documentsChanged;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Promise resolved when the language server manager is ready.
|
|
108
|
+
*/
|
|
109
|
+
get ready() {
|
|
110
|
+
return Private.getLanguageServerManager().ready;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Helper to connect various virtual document signal with callbacks of
|
|
114
|
+
* this class.
|
|
115
|
+
*
|
|
116
|
+
* @param virtualDocument - virtual document to be connected.
|
|
117
|
+
*/
|
|
71
118
|
connectDocumentSignals(virtualDocument) {
|
|
72
119
|
virtualDocument.foreignDocumentOpened.connect(this.onForeignDocumentOpened, this);
|
|
73
120
|
virtualDocument.foreignDocumentClosed.connect(this.onForeignDocumentClosed, this);
|
|
74
121
|
this.documents.set(virtualDocument.uri, virtualDocument);
|
|
75
|
-
this.
|
|
122
|
+
this._documentsChanged.emit(this.documents);
|
|
76
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Helper to disconnect various virtual document signal with callbacks of
|
|
126
|
+
* this class.
|
|
127
|
+
*
|
|
128
|
+
* @param virtualDocument - virtual document to be disconnected.
|
|
129
|
+
*/
|
|
77
130
|
disconnectDocumentSignals(virtualDocument, emit = true) {
|
|
78
131
|
virtualDocument.foreignDocumentOpened.disconnect(this.onForeignDocumentOpened, this);
|
|
79
132
|
virtualDocument.foreignDocumentClosed.disconnect(this.onForeignDocumentClosed, this);
|
|
@@ -82,45 +135,53 @@ export class DocumentConnectionManager {
|
|
|
82
135
|
this.disconnectDocumentSignals(foreign, false);
|
|
83
136
|
}
|
|
84
137
|
if (emit) {
|
|
85
|
-
this.
|
|
138
|
+
this._documentsChanged.emit(this.documents);
|
|
86
139
|
}
|
|
87
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Handle foreign document opened event.
|
|
143
|
+
*/
|
|
88
144
|
onForeignDocumentOpened(_host, context) {
|
|
89
|
-
|
|
145
|
+
/** no-op */
|
|
90
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Handle foreign document closed event.
|
|
149
|
+
*/
|
|
91
150
|
onForeignDocumentClosed(_host, context) {
|
|
92
151
|
const { foreignDocument } = context;
|
|
93
152
|
this.unregisterDocument(foreignDocument, false);
|
|
94
153
|
this.disconnectDocumentSignals(foreignDocument);
|
|
95
154
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
});
|
|
103
|
-
console.debug('Matching servers: ', matchingServers);
|
|
104
|
-
// for now use only the server with the highest priority.
|
|
105
|
-
const languageServerId = matchingServers.length === 0 ? null : matchingServers[0];
|
|
106
|
-
// lazily load 1) the underlying library (1.5mb) and/or 2) a live WebSocket-
|
|
107
|
-
// like connection: either already connected or potentially in the process
|
|
108
|
-
// of connecting.
|
|
109
|
-
const connection = await Private.connection(language, languageServerId, uris, this.onNewConnection, capabilities);
|
|
110
|
-
// if connecting for the first time, all documents subsequent documents will
|
|
111
|
-
// be re-opened and synced
|
|
112
|
-
this.connections.set(virtualDocument.uri, connection);
|
|
113
|
-
return connection;
|
|
114
|
-
}
|
|
155
|
+
/**
|
|
156
|
+
* Register a widget adapter with this manager
|
|
157
|
+
*
|
|
158
|
+
* @param path - path to the inner document of the adapter
|
|
159
|
+
* @param adapter - the adapter to be registered
|
|
160
|
+
*/
|
|
115
161
|
registerAdapter(path, adapter) {
|
|
116
162
|
this.adapters.set(path, adapter);
|
|
117
|
-
adapter.
|
|
163
|
+
adapter.disposed.connect(() => {
|
|
118
164
|
this.adapters.delete(path);
|
|
119
165
|
});
|
|
120
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Handles the settings that do not require an existing connection
|
|
169
|
+
* with a language server (or can influence to which server the
|
|
170
|
+
* connection will be created, e.g. `rank`).
|
|
171
|
+
*
|
|
172
|
+
* This function should be called **before** initialization of servers.
|
|
173
|
+
*/
|
|
121
174
|
updateConfiguration(allServerSettings) {
|
|
122
175
|
this.languageServerManager.setConfiguration(allServerSettings);
|
|
123
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Handles the settings that the language servers accept using
|
|
179
|
+
* `onDidChangeConfiguration` messages, which should be passed under
|
|
180
|
+
* the "serverSettings" keyword in the setting registry.
|
|
181
|
+
* Other configuration options are handled by `updateConfiguration` instead.
|
|
182
|
+
*
|
|
183
|
+
* This function should be called **after** initialization of servers.
|
|
184
|
+
*/
|
|
124
185
|
updateServerConfigurations(allServerSettings) {
|
|
125
186
|
let languageServerId;
|
|
126
187
|
for (languageServerId in allServerSettings) {
|
|
@@ -128,7 +189,7 @@ export class DocumentConnectionManager {
|
|
|
128
189
|
continue;
|
|
129
190
|
}
|
|
130
191
|
const rawSettings = allServerSettings[languageServerId];
|
|
131
|
-
const parsedSettings = expandDottedPaths(rawSettings.
|
|
192
|
+
const parsedSettings = expandDottedPaths(rawSettings.configuration || {});
|
|
132
193
|
const serverSettings = {
|
|
133
194
|
settings: parsedSettings
|
|
134
195
|
};
|
|
@@ -136,12 +197,14 @@ export class DocumentConnectionManager {
|
|
|
136
197
|
}
|
|
137
198
|
}
|
|
138
199
|
/**
|
|
200
|
+
* Retry to connect to the server each `reconnectDelay` seconds
|
|
201
|
+
* and for `retrialsLeft` times.
|
|
139
202
|
* TODO: presently no longer referenced. A failing connection would close
|
|
140
203
|
* the socket, triggering the language server on the other end to exit
|
|
141
204
|
*/
|
|
142
205
|
async retryToConnect(options, reconnectDelay, retrialsLeft = -1) {
|
|
143
206
|
let { virtualDocument } = options;
|
|
144
|
-
if (this.
|
|
207
|
+
if (this._ignoredLanguages.has(virtualDocument.language)) {
|
|
145
208
|
return;
|
|
146
209
|
}
|
|
147
210
|
let interval = reconnectDelay * 1000;
|
|
@@ -160,13 +223,23 @@ export class DocumentConnectionManager {
|
|
|
160
223
|
interval = interval < 5 * 1000 ? interval + 500 : interval;
|
|
161
224
|
}
|
|
162
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Disconnect the connection to the language server of the requested
|
|
228
|
+
* language.
|
|
229
|
+
*/
|
|
163
230
|
disconnect(languageId) {
|
|
164
231
|
Private.disconnect(languageId);
|
|
165
232
|
}
|
|
166
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Create a new connection to the language server
|
|
235
|
+
* @return A promise of the LSP connection
|
|
236
|
+
*/
|
|
167
237
|
async connect(options, firstTimeoutSeconds = 30, secondTimeoutMinutes = 5) {
|
|
168
|
-
let connection = await this.
|
|
238
|
+
let connection = await this._connectSocket(options);
|
|
169
239
|
let { virtualDocument } = options;
|
|
240
|
+
if (!connection) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
170
243
|
if (!connection.isReady) {
|
|
171
244
|
try {
|
|
172
245
|
// user feedback hinted that 40 seconds was too short and some users are willing to wait more;
|
|
@@ -186,9 +259,12 @@ export class DocumentConnectionManager {
|
|
|
186
259
|
}
|
|
187
260
|
}
|
|
188
261
|
}
|
|
189
|
-
this.
|
|
262
|
+
this._connected.emit({ connection, virtualDocument });
|
|
190
263
|
return connection;
|
|
191
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* Disconnect the signals of requested virtual document.
|
|
267
|
+
*/
|
|
192
268
|
unregisterDocument(virtualDocument, emit = true) {
|
|
193
269
|
const connection = this.connections.get(virtualDocument.uri);
|
|
194
270
|
if (connection) {
|
|
@@ -196,12 +272,16 @@ export class DocumentConnectionManager {
|
|
|
196
272
|
const allConnection = new Set(this.connections.values());
|
|
197
273
|
if (!allConnection.has(connection)) {
|
|
198
274
|
this.disconnect(connection.serverIdentifier);
|
|
275
|
+
connection.dispose();
|
|
199
276
|
}
|
|
200
277
|
if (emit) {
|
|
201
|
-
this.
|
|
278
|
+
this._documentsChanged.emit(this.documents);
|
|
202
279
|
}
|
|
203
280
|
}
|
|
204
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Enable or disable the logging feature of the language servers
|
|
284
|
+
*/
|
|
205
285
|
updateLogging(logAllCommunication, setTrace) {
|
|
206
286
|
for (const connection of this.connections.values()) {
|
|
207
287
|
connection.logAllCommunication = logAllCommunication;
|
|
@@ -210,7 +290,37 @@ export class DocumentConnectionManager {
|
|
|
210
290
|
}
|
|
211
291
|
}
|
|
212
292
|
}
|
|
213
|
-
|
|
293
|
+
/**
|
|
294
|
+
* Create the LSP connection for requested virtual document.
|
|
295
|
+
*
|
|
296
|
+
* @return Return the promise of the LSP connection.
|
|
297
|
+
*/
|
|
298
|
+
async _connectSocket(options) {
|
|
299
|
+
let { language, capabilities, virtualDocument } = options;
|
|
300
|
+
this.connectDocumentSignals(virtualDocument);
|
|
301
|
+
const uris = DocumentConnectionManager.solveUris(virtualDocument, language);
|
|
302
|
+
const matchingServers = this.languageServerManager.getMatchingServers({
|
|
303
|
+
language
|
|
304
|
+
});
|
|
305
|
+
console.debug('Matching servers: ', matchingServers);
|
|
306
|
+
// for now use only the server with the highest rank.
|
|
307
|
+
const languageServerId = matchingServers.length === 0 ? null : matchingServers[0];
|
|
308
|
+
// lazily load 1) the underlying library (1.5mb) and/or 2) a live WebSocket-
|
|
309
|
+
// like connection: either already connected or potentially in the process
|
|
310
|
+
// of connecting.
|
|
311
|
+
if (!uris) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const connection = await Private.connection(language, languageServerId, uris, this.onNewConnection, capabilities);
|
|
315
|
+
// if connecting for the first time, all documents subsequent documents will
|
|
316
|
+
// be re-opened and synced
|
|
317
|
+
this.connections.set(virtualDocument.uri, connection);
|
|
318
|
+
return connection;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Helper to apply callback on all documents of a connection.
|
|
322
|
+
*/
|
|
323
|
+
_forEachDocumentOfConnection(connection, callback) {
|
|
214
324
|
for (const [virtualDocumentUri, currentConnection] of this.connections.entries()) {
|
|
215
325
|
if (connection !== currentConnection) {
|
|
216
326
|
continue;
|
|
@@ -220,6 +330,12 @@ export class DocumentConnectionManager {
|
|
|
220
330
|
}
|
|
221
331
|
}
|
|
222
332
|
(function (DocumentConnectionManager) {
|
|
333
|
+
/**
|
|
334
|
+
* Generate the URI of a virtual document from input
|
|
335
|
+
*
|
|
336
|
+
* @param virtualDocument - the virtual document
|
|
337
|
+
* @param language - language of the document
|
|
338
|
+
*/
|
|
223
339
|
function solveUris(virtualDocument, language) {
|
|
224
340
|
const wsBase = PageConfig.getBaseUrl().replace(/^http/, 'ws');
|
|
225
341
|
const rootUri = PageConfig.getOption('rootUri');
|
|
@@ -233,7 +349,7 @@ export class DocumentConnectionManager {
|
|
|
233
349
|
});
|
|
234
350
|
const languageServerId = matchingServers.length === 0 ? null : matchingServers[0];
|
|
235
351
|
if (languageServerId === null) {
|
|
236
|
-
|
|
352
|
+
return;
|
|
237
353
|
}
|
|
238
354
|
// workaround url-parse bug(s) (see https://github.com/jupyter-lsp/jupyterlab-lsp/issues/595)
|
|
239
355
|
let documentUri = URLExt.join(baseUri, virtualDocument.uri);
|
|
@@ -291,8 +407,6 @@ var Private;
|
|
|
291
407
|
serverIdentifier: languageServerId,
|
|
292
408
|
capabilities: capabilities
|
|
293
409
|
});
|
|
294
|
-
// TODO: remove remaining unbounded users of connection.on
|
|
295
|
-
connection.setMaxListeners(999);
|
|
296
410
|
_connections.set(languageServerId, connection);
|
|
297
411
|
connection.connect(socket);
|
|
298
412
|
onCreate(connection);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection_manager.js","sourceRoot":"","sources":["../src/connection_manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AA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