(method: string, params: unknown)
| 314 | }, |
| 315 | |
| 316 | async sendNotification(method: string, params: unknown): Promise<void> { |
| 317 | if (!connection) { |
| 318 | throw new Error('LSP client not started') |
| 319 | } |
| 320 | |
| 321 | checkStartFailed() |
| 322 | |
| 323 | try { |
| 324 | await connection.sendNotification(method, params) |
| 325 | } catch (error) { |
| 326 | const err = error as Error |
| 327 | logError( |
| 328 | new Error( |
| 329 | `LSP server ${serverName} notification ${method} failed: ${err.message}`, |
| 330 | ), |
| 331 | ) |
| 332 | // Don't re-throw for notifications - they're fire-and-forget |
| 333 | logForDebugging(`Notification ${method} failed but continuing`) |
| 334 | } |
| 335 | }, |
| 336 | |
| 337 | onNotification(method: string, handler: (params: unknown) => void): void { |
| 338 | if (!connection) { |
nothing calls this directly
no test coverage detected