File tree Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,7 @@ export class LSPConnection extends LspWsConnection {
30
30
}
31
31
32
32
protected onServerInitialized ( params : lsProtocol . InitializeResult ) {
33
- const settings = {
34
- "yaml.schemas" : {
35
- "http://json.schemastore.org/composer" : "/*"
36
- }
37
- }
38
- const initParams = { ...params , settings }
39
- super . onServerInitialized ( initParams ) ;
33
+ super . onServerInitialized ( params ) ;
40
34
while ( this . documentsToOpen . length ) {
41
35
this . sendOpen ( this . documentsToOpen . pop ( ) ) ;
42
36
}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { sleep, until_ready } from './utils';
8
8
// Name-only import so as to not trigger inclusion in main bundle
9
9
import * as ConnectionModuleType from './connection' ;
10
10
import { TLanguageServerId , ILanguageServerManager } from './tokens' ;
11
+ import { ClientConfigurationSchema } from './_schema'
11
12
12
13
export interface IDocumentConnectionData {
13
14
virtual_document : VirtualDocument ;
@@ -148,11 +149,17 @@ export class DocumentConnectionManager {
148
149
return connection ;
149
150
}
150
151
151
- public updateServerConfigurations (
152
- options ?: { }
152
+ public async updateServerConfigurations (
153
+ //TODO: define types for server configurations
154
+ options : any
153
155
) {
154
- for ( let [ , connection ] of this . connections ) {
155
- connection . sendConfigurationChange ( options )
156
+ for ( let language in options ) {
157
+ let connection = this . connections . get ( language )
158
+
159
+ if ( connection ) {
160
+ const config = options [ language ] . config
161
+ await connection . sendConfigurationChange ( config )
162
+ }
156
163
}
157
164
}
158
165
Original file line number Diff line number Diff line change @@ -236,14 +236,16 @@ const plugin: JupyterFrontEndPlugin<void> = {
236
236
237
237
function updateOptions ( settings : ISettingRegistry . ISettings ) : void {
238
238
const options = settings . composite ;
239
+
239
240
// Object.keys(options).forEach((key) => {
240
241
// if (key === 'modifier') {
241
242
// // let modifier = options[key] as KeyModifier;
242
243
// CodeMirrorExtension.modifierKey = modifier;
243
244
// }
244
245
// });
245
- console . log ( connection_manager )
246
- connection_manager . updateServerConfigurations ( options )
246
+
247
+ const languageServerSettings = options . language_servers || { } ;
248
+ connection_manager . updateServerConfigurations ( languageServerSettings ) ;
247
249
}
248
250
249
251
settingRegistry
Original file line number Diff line number Diff line change @@ -269,7 +269,8 @@ export class LspWsConnection extends events.EventEmitter
269
269
}
270
270
271
271
public sendConfigurationChange (
272
- options ?: any
272
+ //TODO: define types for server configurations
273
+ options : any
273
274
) {
274
275
console . log ( `Updated server configuration: ${ JSON . stringify ( options ) } ` )
275
276
if ( ! this . isReady ) {
@@ -619,7 +620,6 @@ export class LspWsConnection extends events.EventEmitter
619
620
}
620
621
621
622
protected onServerInitialized ( params : protocol . InitializeResult ) {
622
- console . log ( "MODIFIED SERVER INIT 4" , params )
623
623
this . isInitialized = true ;
624
624
this . serverCapabilities = params . capabilities ;
625
625
this . connection . sendNotification ( 'initialized' ) ;
You can’t perform that action at this time.
0 commit comments