()
| 129 | } |
| 130 | |
| 131 | syncFiles(): readonly WorkspaceFileUpdate[] { |
| 132 | const updates: WorkspaceFileUpdate[] = []; |
| 133 | for (const file of this.files) { |
| 134 | const view = file.getView(); |
| 135 | if (!view) continue; |
| 136 | const plugin = LSPPlugin.get(view); |
| 137 | if (!plugin) continue; |
| 138 | const { unsyncedChanges } = plugin; |
| 139 | if (unsyncedChanges.empty) continue; |
| 140 | |
| 141 | updates.push({ file, prevDoc: file.doc, changes: unsyncedChanges }); |
| 142 | file.doc = view.state.doc; |
| 143 | file.version = this.#nextFileVersion(file.uri); |
| 144 | plugin.clear(); |
| 145 | } |
| 146 | return updates; |
| 147 | } |
| 148 | |
| 149 | openFile(uri: string, languageId: string, view: EditorView): void { |
| 150 | if (!view) return; |
nothing calls this directly
no test coverage detected