(lsp: WatLSP)
| 369 | } |
| 370 | |
| 371 | function createParseCache(lsp: WatLSP) { |
| 372 | let lastText = ""; |
| 373 | return (text: string) => { |
| 374 | if (text !== lastText) { |
| 375 | lsp.parse(text); |
| 376 | lastText = text; |
| 377 | } |
| 378 | }; |
| 379 | } |
| 380 | |
| 381 | function createLspExtensions(lsp: WatLSP) { |
| 382 | const parseIfNeeded = createParseCache(lsp); |
no outgoing calls
no test coverage detected