Skip to content

Commit b3984de

Browse files
committed
Add an interface for server configurations
1 parent bca1970 commit b3984de

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

packages/jupyterlab-lsp/src/connection_manager.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ export interface ISocketConnectionOptions {
2626
document_path: string;
2727
}
2828

29+
export interface IServerConfigurationSettings {
30+
/**
31+
* The config params must be nested inside the settings keyword
32+
*/
33+
settings: {
34+
[k: string]: any;
35+
};
36+
}
37+
2938
/**
3039
* Each Widget with a document (whether file or a notebook) has its own DocumentConnectionManager
3140
* (see JupyterLabWidgetAdapter), keeping the virtual document spaces separate if a file is opened twice.
@@ -386,8 +395,8 @@ namespace Private {
386395
}
387396

388397
export function updateServerConfiguration(
389-
language_server_id: any,
390-
settings: any
398+
language_server_id: TLanguageServerId,
399+
settings: IServerConfigurationSettings
391400
): void {
392401
const connection = _connections.get(language_server_id);
393402
if (connection) {

packages/lsp-ws-connection/src/ws-connection.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ export class LspWsConnection extends events.EventEmitter
269269
}
270270

271271
public sendConfigurationChange(
272-
// TODO: define types for server configurations
273-
settings: any
272+
settings: protocol.DidChangeConfigurationParams
274273
) {
275274
console.log(`Updated server configuration: ${JSON.stringify(settings)}`);
276275
if (!this.isReady) {

0 commit comments

Comments
 (0)