( server: LspServerDefinition, clientConfig: Record<string, unknown>, )
| 132 | } |
| 133 | |
| 134 | function resolveInitializationOptions( |
| 135 | server: LspServerDefinition, |
| 136 | clientConfig: Record<string, unknown>, |
| 137 | ): Record<string, unknown> | undefined { |
| 138 | const serverOptions = isPlainObject(server.initializationOptions) |
| 139 | ? server.initializationOptions |
| 140 | : null; |
| 141 | const clientOptions = isPlainObject(clientConfig.initializationOptions) |
| 142 | ? clientConfig.initializationOptions |
| 143 | : null; |
| 144 | |
| 145 | if (serverOptions && clientOptions) { |
| 146 | return { |
| 147 | ...serverOptions, |
| 148 | ...clientOptions, |
| 149 | }; |
| 150 | } |
| 151 | |
| 152 | return serverOptions || clientOptions || undefined; |
| 153 | } |
| 154 | |
| 155 | interface InternalLSPRequest<Result> { |
| 156 | promise: Promise<Result>; |
no test coverage detected