@@ -54,7 +54,8 @@ export namespace Method {
54
54
export enum ServerRequest {
55
55
REGISTER_CAPABILITY = 'client/registerCapability' ,
56
56
SHOW_MESSAGE_REQUEST = 'window/showMessageRequest' ,
57
- UNREGISTER_CAPABILITY = 'client/unregisterCapability'
57
+ UNREGISTER_CAPABILITY = 'client/unregisterCapability' ,
58
+ WORKSPACE_CONFIGURATION = 'workspace/configuration'
58
59
}
59
60
60
61
/** Client requests */
@@ -95,12 +96,14 @@ export interface IServerRequestParams {
95
96
[ Method . ServerRequest . REGISTER_CAPABILITY ] : lsp . RegistrationParams ;
96
97
[ Method . ServerRequest . SHOW_MESSAGE_REQUEST ] : lsp . ShowMessageRequestParams ;
97
98
[ Method . ServerRequest . UNREGISTER_CAPABILITY ] : lsp . UnregistrationParams ;
99
+ [ Method . ServerRequest . WORKSPACE_CONFIGURATION ] : lsp . ConfigurationParams ;
98
100
}
99
101
100
102
export interface IServerResult {
101
103
[ Method . ServerRequest . REGISTER_CAPABILITY ] : void ;
102
104
[ Method . ServerRequest . SHOW_MESSAGE_REQUEST ] : lsp . MessageActionItem | null ;
103
105
[ Method . ServerRequest . UNREGISTER_CAPABILITY ] : void ;
106
+ [ Method . ServerRequest . WORKSPACE_CONFIGURATION ] : any [ ] ;
104
107
}
105
108
106
109
export interface IClientRequestParams {
@@ -464,6 +467,17 @@ export class LSPConnection extends LspWsConnection {
464
467
) ;
465
468
}
466
469
) ;
470
+
471
+ this . serverRequests [ 'workspace/configuration' ] . setHandler ( async params => {
472
+ return params . items . map ( item => {
473
+ // LSP: "If the client can’t provide a configuration setting for a given scope
474
+ // then `null` needs to be present in the returned array."
475
+
476
+ // for now we do not support configuration, but yaml server does not respect
477
+ // client capability so we have a handler just for that
478
+ return null ;
479
+ } ) ;
480
+ } ) ;
467
481
}
468
482
469
483
public sendSelectiveChange (
0 commit comments